Hello,
It would be nice to add support for "--dns-opt" Docker parameter.
Docker feature documented here: https://docs.docker.com/engine/userguide/networking/default_network/configure-dns/
Thanks!
Yes, this is not just nice but needed.
I've hit a new (issue)[https://github.com/docker/docker/issues/22185#issuecomment-220556329] and the only decent workaround is to specify a --dns-opt (use-vc
). The lack of this in compose means that I will need to start some containers from a bash script instead of from the compose file.
I've found another workaround : Add in the entry-point a grep/echo with the options on /etc/resolv.conf:
grep 'options single-request' /etc/resolv.conf || sudo sh -c 'echo "options single-request" >> /etc/resolv.conf'
yes please!
The workaround suggested by @mgodlewski doesn't seem to work anymore (I'm on docker 1.12.5), the /etc/resolve.conf
file seems to get replaced by a standard one even if I try to add the options single-request
to /etc/resolve.conf
in the Dockerfile.
Does anyone have a good workaround for this issue?
The workaround is always working but must be set in an entrypoint (not in a the Dockerfile), since this file is generated on container startup.
Looks like this was implemented in c7b8278e78197b87399977c8a512ef72631816a3 circa 1.12.0.
Most helpful comment
Yes, this is not just nice but needed.
I've hit a new (issue)[https://github.com/docker/docker/issues/22185#issuecomment-220556329] and the only decent workaround is to specify a --dns-opt (
use-vc
). The lack of this in compose means that I will need to start some containers from a bash script instead of from the compose file.