mirror of https://github.com/ansible/ansible.git
Implements extra_hosts for docker_image module (#59540)
* Implements etc_hosts for docker_image module Allows custom hosts on docker_image module. The of this option made impossible to use docker_image module to build images that required a custom hostname in /etc/hosts. For running containers this option was already present. While the python-docker API uses extra_hosts term, our existing module already uses etc_hosts argument, so it sounds better to have some consistency between docker_container and docker_image. Fixes: #59233 * Update test/integration/targets/docker_image/files/EtcHostsDockerfile Co-Authored-By: Felix Fontein <felix@fontein.de> * Update lib/ansible/modules/cloud/docker/docker_image.py Co-Authored-By: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/docker_image_etc_hosts.yml Co-Authored-By: Felix Fontein <felix@fontein.de>pull/59540/merge
parent
30c1d9754d
commit
7c6fb57b7d
@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- docker_image - added ``extra_hosts`` argument (https://github.com/ansible/ansible/issues/59233)
|
@ -0,0 +1,3 @@
|
||||
FROM busybox
|
||||
# This should fail building if docker cannot resolve some-custom-host
|
||||
RUN ping -c1 some-custom-host
|
Loading…
Reference in New Issue