Docker Community Forums

Share and learn in the Docker community.

Docker networking issue I resolved, but why?

(Matt Schuchard) #1

Docker version 1.6.2, build 7c8fca2 on Ubuntu 15.10

Today I suddenly noticed that when I built a docker image I was getting errors like the following with apt-get and dnf:

Err wily InRelease
Err wily-updates InRelease
Err wily-security InRelease
Err wily Release.gpg
Temporary failure resolving ''
Err wily-updates Release.gpg
Temporary failure resolving ''
Err wily-security Release.gpg
Temporary failure resolving ''

Error: Failed to synchronize cache for repo 'fedora' from '': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for [Could not resolve host:]

For troubleshooting I tried spinning up a Vagrant instance of Ubuntu 14.04 and it grabbed packages with apt-get just fine.
By simple scientific experimentation this meant I had a networking issue from within Docker itself. I tried

sudo systemctl restart networking
sudo systemctl restart network-manager

to of no avail. Then I tried

sudo systemctl restart docker

which DID fix the issue and now the images I build can grab packages from Fedora and Ubuntu just fine. I find it unsatisfactory that I fixed a problem with agnostic heuristics. Could someone please explain to me why what I did fixed the problem so I can set some kind of automated trigger for it for the future?

(Dvohra) #2

Is the Dockerfile built FROM fedora? If so, could be a bug as discussed in