-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker build dns resolution fails after a restart #66
Comments
Huh, very interesting -- I think this error is actually coming from |
I think my issue might be related. Recently moved to Ubuntu 22.04 dev release. Followed the familiar steps and have Docker Snap (
|
I guess there is some sort of race condition between NetworkManager and docker daemon which eventually breaks the docker daemon. As a workaround, I have permanently disabled docker daemon auto start using Then restart the PC. And whenever I need to use docker, I will simply start it using Now there is no conflict as docker does not auto start and I will start docker only when I need it. For easy access, I have aliased the docker start and stop commands.
alias start-docker='sudo snap start docker'
alias stop-docker='sudo snap stop docker' |
Reproduction
snap remove --purge docker
snap install docker
docker build
worksdocker build
fails with Temporary failure in name resolutionsnap stop --disable
followed bysnap start --enable
does not help.Is there a way to tell dockerd to refresh its dns configuration? Or to inspect what it's current configuration is?
There's no point in me defining a hardcoded dns in
daemon.json
, since it changes everytime I connect toa different VPN. But it's OK for me to restart the docker daemon if I knew how to tell it to "use the current
dns from resolv.conf".
I suspect this error happens because when my laptop starts, there is a race condition between the vpn daemon
and dockerd daemon. The VPN comes up after dockerd has made its decision about which dns to use. The
moment the VPN comes up, the dns server in
resolv.con
changes, and dockerd is now using a stale value.The text was updated successfully, but these errors were encountered: