# DNS issue with building ruby image

**URL:** <https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060>\
**Category:** Docker Desktop\
**Tags:** build\
**Created:** [March 30, 2016, 3:53pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060 "2016-03-30T15:53:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dougvk](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/dougvk/32/6232_2.png) [@dougvk](https://forums.docker.com/u/dougvk)\
**Post date:** [March 30, 2016, 3:53pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/1 "2016-03-30T15:53:02Z")

</div>

### Expected behavior

It should build the image. I copied the dockerfile from [https://docs.docker.com/compose/rails/](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: 149.20.20.19 80]`

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

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

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

### Information

`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 .`

---

<div class="post-metadata">

**Author:** ![dsheets](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/dsheets/32/5823_2.png) [@dsheets](https://forums.docker.com/u/dsheets)\
**Post date:** [March 30, 2016, 4:50pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/2 "2016-03-30T16:50:47Z")

</div>

Do you perhaps have `pow` installed?

---

<div class="post-metadata">

**Author:** ![dougvk](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/dougvk/32/6232_2.png) [@dougvk](https://forums.docker.com/u/dougvk)\
**Post date:** [March 30, 2016, 7:29pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/3 "2016-03-30T19:29:42Z")

</div>

that was it! amazing.

---

<div class="post-metadata">

**Author:** ![justincormack](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/justincormack/32/6760_2.png) [@justincormack](https://forums.docker.com/u/justincormack)\
**Post date:** [March 31, 2016, 11:01am UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/4 "2016-03-31T11:01:39Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![kevinkarwaski](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/kevinkarwaski/32/6240_2.png) [@kevinkarwaski](https://forums.docker.com/u/kevinkarwaski)\
**Post date:** [April 1, 2016, 3:52pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/5 "2016-04-01T15:52:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ktheory](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/ktheory/32/7342_2.png) [@ktheory](https://forums.docker.com/u/ktheory)\
**Post date:** [April 13, 2016, 4:14pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/6 "2016-04-13T16:14:46Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![anlek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/anlek/32/8174_2.png) [@anlek](https://forums.docker.com/u/anlek)\
**Post date:** [April 21, 2016, 12:05am UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/7 "2016-04-21T00:05:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anlek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/anlek/32/8174_2.png) [@anlek](https://forums.docker.com/u/anlek)\
**Post date:** [May 4, 2016, 5:23pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/8 "2016-05-04T17:23:24Z")

</div>

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 ☹.

Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![ktheory](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/ktheory/32/7342_2.png) [@ktheory](https://forums.docker.com/u/ktheory)\
**Post date:** [May 17, 2016, 7:41pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/9 "2016-05-17T19:41:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prognostikos](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/prognostikos/32/7440_2.png) [@prognostikos](https://forums.docker.com/u/prognostikos)\
**Post date:** [May 19, 2016, 1:02pm UTC](https://forums.docker.com/t/dns-issue-with-building-ruby-image/8060/10 "2016-05-19T13:02:43Z")

</div>

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.
