[Bug 1387805] [NEW] docker.io containers cannot use local dnsmasq

Horst Schirmeier horst at schirmeier.com
Thu Oct 30 17:17:20 UTC 2014


Public bug reported:

docker.io (1.0.1~dfsg1-0ubuntu1~ubuntu0.14.04.1 from trusty-updates)
containers fail to resolve host names if dnsmasq is used in the host
system:

$ docker build -t some-image
Sending build context to Docker daemon 4.096 kB
Sending build context to Docker daemon 
Step 0 : FROM ubuntu:utopic
Pulling repository ubuntu
277eb4304907: Download complete 
511136ea3c5a: Download complete 
e12c576ad8a1: Download complete 
102eb2a101b8: Download complete 
530dbbae98a0: Download complete 
37dde56c3a42: Download complete 
8f118367086c: Download complete 
 ---> 277eb4304907
Step 1 : MAINTAINER [...]
 ---> Running in 0d7110f3c6b3
 ---> 6ad364dded22
Removing intermediate container 0d7110f3c6b3
Step 2 : RUN apt-get update
 ---> Running in 38995d975211
Err http://archive.ubuntu.com utopic InRelease
Err http://archive.ubuntu.com utopic-updates InRelease
Err http://archive.ubuntu.com utopic-security InRelease  
Err http://archive.ubuntu.com utopic Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com utopic-updates Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com utopic-security Release.gpg
  Could not resolve 'archive.ubuntu.com'
[...]

$ grep nameserver /etc/resolv.conf
nameserver 127.0.1.1

Workaround: Disable dnsmasq by commenting it out the "dns=dnsmasq" line
in /etc/NetworkManager/NetworkManager.conf and restarting the network-
manager and docker.io services (sudo service network-manager restart &&
sudo service docker.io restart). Alternatively enable the commented out
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4" line in /etc/default/docker.io
(and also restart the docker.io service). The latter workaround of
course requires the 8.8.8.8 / 8.8.4.4 servers to be reachable from your
network.

See also:
https://stackoverflow.com/questions/25130536/dockerfile-docker-build-cant-download-packages-centos-yum-debian-ubuntu-ap
https://github.com/docker/docker/issues/541
https://stackoverflow.com/questions/24991136/docker-build-could-not-resolve-archive-ubuntu-com-apt-get-fails-to-install-a

** Affects: docker.io (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to docker.io in Ubuntu.
https://bugs.launchpad.net/bugs/1387805

Title:
  docker.io containers cannot use local dnsmasq

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1387805/+subscriptions



More information about the Ubuntu-server-bugs mailing list