DNS issue with building ruby image

Expected behavior

It should build the image. I copied the dockerfile from https://docs.docker.com/compose/rails/

Actual behavior

Sending build context to Docker daemon 24.93 MB Step 1 : FROM ruby:2.2 ---> a325edf23092
Step 2 : RUN apt-get update -qq; apt-get install -y qt5-default qt5-dev ---> Running in b4a86c4d7095
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages 404 Not Found [IP: 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found [IP: 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.


OS X: version 10.10.5 (build: 14F1021) Docker.app: version v1.10.3-beta5 Running diagnostic tests: [OK] docker-cli [OK] Moby booted [OK] driver.amd64-linux [OK] vmnetd [OK] lofs [OK] osxfs [OK] db [OK] slirp [OK] menubar [OK] environment [OK] Docker [OK] VT-x Docker logs are being collected into /tmp/20160330-115159.tar.gz. Your unique id in bugsnag is: 6EF9FC47-101D-450E-ABBA-6B0EE79C3244
Please quote this in all correspondence.

Steps to reproduce the behavior

  1. create dockerfile from website
  2. run docker build .

Do you perhaps have pow installed?

that was it! amazing.

pow does really odd things with networking, we have had other issues reported, and we think it may be a bug in pow, we would be happy to help resolve the issue with the authors if someone files an upstream bug. It seems to break name resolution for normal usage even from the host as far as we could see.

I’ve seen this too with npm install and apt-get install in docker builds against a few different Dockerfiles. After removing pow, it now works with NAT networking.

Side note, It worked with pow installed if I switched to hostnet (VPN Compat) mode.

For what it’s worth, I found that Pow firewall rules were broken after starting or stopped Docker for Mac Version 1.11.0-beta6 (build: 5404).

Reloading packet filter rules after starting/stopped Docker for Mac fixes pow for me:

sudo pfctl -f /etc/pf.conf; sudo pfctl -e

Nice, that fixed it for me.
Thanks @ktheory.

Now that a new version of Docker for Mac came out, it seems I can’t run docker and pow together on localhost (or appname.dev). Not sure how to fix this. I stopped pow from running and docker doesn’t seem to pick up the slack :frowning:.

Anyone have any ideas?

As of Docker for Mac Version 1.11.1-beta11 (build: 6974), Pow and Docker play nicely together.

After starting/stopping docker a few times, I’ve had no need to run sudo pfctl -f /etc/pf.conf; sudo pfctl -e yet.

1 Like

Another data point - 1.11.1-beta12 broke Pow - reverted to beta11 and all’s well again.

To revert, I just quit Docker in the menu bar, moved the Docker (6974) app out of the trash, and installed it.