diff --git a/plugins/modules/docker_container.py b/plugins/modules/docker_container.py index 60768637..20cc88d9 100644 --- a/plugins/modules/docker_container.py +++ b/plugins/modules/docker_container.py @@ -340,6 +340,9 @@ options: description: - Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container's C(/etc/hosts) file. + - Instead of an IP address, the special value V(host-gateway) can also be used, which + resolves to the host's gateway IP and allows containers to connect to services running + on the host. type: dict exposed_ports: description: diff --git a/plugins/modules/docker_image.py b/plugins/modules/docker_image.py index b229ad38..b5a98c97 100644 --- a/plugins/modules/docker_image.py +++ b/plugins/modules/docker_image.py @@ -100,6 +100,9 @@ options: etc_hosts: description: - Extra hosts to add to C(/etc/hosts) in building containers, as a mapping of hostname to IP address. + - Instead of an IP address, the special value V(host-gateway) can also be used, which + resolves to the host's gateway IP and allows building containers to connect to services running + on the host. type: dict args: description: diff --git a/plugins/modules/docker_image_build.py b/plugins/modules/docker_image_build.py index 48478b55..75f52f3c 100644 --- a/plugins/modules/docker_image_build.py +++ b/plugins/modules/docker_image_build.py @@ -79,6 +79,9 @@ options: etc_hosts: description: - Extra hosts to add to C(/etc/hosts) in building containers, as a mapping of hostname to IP address. + - Instead of an IP address, the special value V(host-gateway) can also be used, which + resolves to the host's gateway IP and allows building containers to connect to services running + on the host. type: dict args: description: