Docker Community Forums

Share and learn in the Docker community.

/etc/resolv.conf [newb]

Hi,

I’ve noticed that changing /etc/resolv.conf on the host doesn’t change the contents of the same file within a running container. Is it true that docker copies /etc/resolv.conf from the host into a container during the container’s creation and then that file stays static until the container is removed?

I can’t find any information on whether it’s at all possible to keep them in sync short of maybe mounting /etc/resolv.conf as a volume from within the container?

Would appreciate any pointers.

Thanks!
S