docker.io host name resolution fails after switching networks

Bug #1387875 reported by Horst Schirmeier on 2014-10-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker.io (Ubuntu)
Undecided
Unassigned

Bug Description

When switching networks, docker.io (1.0.1~dfsg1-0ubuntu1~ubuntu0.14.04.1 from trusty-updates) does not notice when the contents of /etc/resolv.conf change. This is a quite common situation when using a notebook with dnsmasq disabled in /etc/NetworkManager/NetworkManager.conf. (Using dnsmasq together with docker.io is out of the question due to bug #1387805.)

In the following example, 99.99.99.99 is a placeholder for the DNS server address in the network the notebook was connected to previously. This IP is not mentioned in /etc/resolv.conf anymore. From the current network, this IP is not reachable.

$ docker build 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
2014/10/30 21:55:00 Get https://index.docker.io/v1/repositories/ubuntu/images: dial tcp: lookup index.docker.io on 99.99.99.99:53: no answer from server
make: *** [all] Error 1

Expected behavior: docker should be automatically notified when /etc/resolv.conf changes, and use the appropriate DNS server for the network we're currently connected to.

Workaround:

$ sudo service docker.io restart
docker.io stop/waiting
docker.io start/running, process 2369
$ docker build 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
[...]

Michael Hudson-Doyle (mwhudson) wrote :

Is this still a problem?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers