How to specify docker image's DNS?
I’ve known two possible ways:
1) use command-line argument ‘-dns’
DOCKER_OPTS and restart docker daemon
The above two ways force me to either change my
docker run command, or restart daemon which will stop all currently running containers. I cannot accept these.
So, is there any way else to change a docker image’s DNS? (re-run an image is acceptable)
One Solution collect form web for “How to specify docker image's DNS?”
You can write to
/etc/resolv.conf inside a container. Perhaps
EXEC a script that does that and then runs the real program.