module

Krikri::PluginHelpers::DockerPorts

DockerPorts - pure logic for parsing a docker_container ports: entry into its host_ip/host_port/container_port/proto components. No I/O - docker_container.cr does the actual API calls.

Class methods

parse(entry : String) : Mapping

Parses one ports: entry. Supported forms (matching real Ansible's docker_container ports: syntax): "80" -> container_port=host_port=80, no host_ip "8080:80" -> host_port=8080, container_port=80 "127.0.0.1:8080:80" -> host_ip=127.0.0.1, host_port=8080, container_port=80 any of the above + "/udp" -> proto=udp (default "tcp")

Source

Nested types