Dns Resolving Stops Working Issue 1132 Docker/for-mac Github

Posted : admin On 15.02.2020
  1. Dns Resolving Stops Working Issue 1132 Docker/for-mac Github.com

Expected behavior DNS should resolve consistently within a container every time. Actual behavior Occasionally DNS will not resolve with no pattern, and causes failures when doing a docker build Information OS X: version 10.11.4 (build: 15E65) Docker.app: version v1.11.0-beta7 Running diagnostic tests: OK docker-cli OK Moby booted OK driver.amd64-linux OK vmnetd OK osxfs OK db OK slirp OK menubar OK environment OK Docker OK VT-x Docker logs are being collected into /tmp/20124.tar.gz Most specific failure is: No error was detected Your unique id is: B252C346-DC86-40B3-AFE8-FF88F8B6571C Please quote this in all correspondence.

1132

I’ve created a repository with the Dockerfile and other files I’ve used to reproduce this issue. Steps to reproduce the behavior.

git clone:ecliptik/docker-beta-mac-ruby.git. docker build -no-cache -t docker-beta-mac-ruby. Look for Gem::RemoteFetcher::UnknownHostError: no such name errors More Information This issue first appeared after turning off VPN Compatibility Mode from the Docker App settings because I wanted to use the docker.local DNS alias instead of finding out the IP of the docker VM to test the rails app on port 3000. When turning this setting off all docker commands started not working (see my related comment in ). In order to try and bring Docker back up properly I’ve done the following:. Rebooted the Mac.

1132

Dns Resolving Stops Working Issue 1132 Docker/for-mac Github.com

Reset Docker to Factory Defaults. Re-installed from scratch Now Docker only works if the VPN Setting is checked.

I can also reproduce an intermittent DNS issue from a container shell with the same repository. The same dig command from OSX does not produce any timeouts. git clone:ecliptik/docker-beta-mac-ruby.git. docker build -f Dockerfile.shell -no-cache -t docker-beta-mac-ruby.

docker run -it -rm docker-beta-mac-ruby. while true; do dig +short; sleep 1; done This will do a lookup on every second, and occasionally it will give a DNS issue. Here is some example output: root@d3eede8e3d0a:/app# cat /etc/resolv.conf search local nameserver 192.168.64.1 root@d3eede8e3d0a:/app# while true; do dig rubygems.org +short; sleep 1; done 54.186.104.15 54.186.104.15; DiG 9.9.5-9+deb8u6-Debian rubygems.org +short;; global options: +cmd;; connection timed out; no servers could be reached 54.186.104.15 54.186.104.15 54.186.104.15 54.186.104.15 54.186.104.15 54.186.104.15 54.186.104.15 54.186.104.15. I too am seeing intermittent DNS issues from inside a container shell, though I’ve not seen it while building. When testing some updates to gems or node modules and running bundle install or npm install #### I will get errors about resolving the host. Adding the proper lines to /etc/hosts allows the commands to finish so it’s not networking in general, strictly DNS for some reason.

I can resolve the names on my host with no issue. Information OS X: version 10.11.4 (build: 15E65) Docker.app: version v1.11.0-beta8.2 Running diagnostic tests: OK docker-cli OK Moby booted OK driver.amd64-linux OK vmnetd OK osxfs OK db OK slirp OK menubar OK environment OK Docker OK VT-x Docker logs are being collected into /tmp/20108.tar.gz Most specific failure is: No error was detected Would you like to upload log files? Y/n: Y Your unique id is: 609D836B-2C26-4410-A777-8D58D6D5A557 #Dockerfile FROM ruby:2.2 # Install apt based dependencies required to run Rails as # well as RubyGems. As the Ruby image itself is based on a # Debian image, we use apt-get to install those.

RUN apt-get update && apt-get install -y build-essential postgresql-client # Configure the main working directory. This is the base # directory used in any further RUN, COPY, and ENTRYPOINT # commands.

Issue

RUN mkdir -p /app WORKDIR /app # Copy the Gemfile as well as the Gemfile.lock and install # the RubyGems. This is a separate step so the dependencies # will be cached unless changes to one of those two files # are made. COPY Gemfile Gemfile.lock./ RUN gem install bundler && bundle install -jobs 20 -retry 5 RUN wget RUN tar -C /usr/local -strip-components 1 -xzf node-v5.7.0-linux-x64.tar.gz WORKDIR /tmp COPY package.json./ RUN npm install && npm install -g gulp-cli WORKDIR /app # Copy the main application. COPY./ # Expose port 3000 to the Docker host, so we can access it # from the outside. Version 1.11.1-beta10 (build: 6662) Running multiple debian:wheezy Docker builds, noticed the wget in the Dockerfile started to hang. The embedded DNS server used is no longer responding. Stopping / restarting docker works.

Resolving against a public service (e.g. 8.8.4.4) works. Workaround for an image might then be to point resolv.conf to something public if this were a prod build but its beta so lets keep letting it lock up Session:% screen /Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty docker login: root Welcome to the Moby alpha, based on Alpine Linux.

Docker:# host www.google.com ^Cdocker:# host www.google.com 8.8.8.8 Using domain server: Name: 8.8.8.8 Address: 8.8.8.8#53 Aliases: www.google.com has address 216.177.189.177 www.google.com has address 216.177.189.151. This is still an issue with beta19 Diagnostic ID: D4F0D98E-8F73-4F24-B486-7A43E779721D My specific case is running a python ‘pip install’ command in a container, installing a series of packages read from a file (pip install -r). The packages are installed from. When running pip install multiple times, at random points during the pip install run, installation of a package will fail due to a failure to resolve. Successive runs of pip install will fail on different packages.

I.e., the failure is not related to the installation of a specific package. Occasionally, the pip install will successfully make it through installing all packages specified in the file, but this is a rarity. Another data point: Using ‘screen’ to access the Mac VM directly (screen /Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty) and then attempting to ping will produce occasional failures resolving (bad address ‘’) Dig also intermittently fails from directly within the VM: moby:# dig; DiG 9.10.4-P1 ;; global options: +cmd;; connection timed out; no servers could be reached moby:#.

I also tried this by adding Google’s DNS to /etc/resolve.conf. This fixed DNS for external hosts, but then the DNS for hosts on my local network (needed for accessing source code control) stopped working. As I understand it resolve.conf only supports one name server (so long as that name server responds OK). For now I’ve reverted back to the stable channel of Docker for Mac and all my builds are working again. My issue by the way was that pypi.python.org would not resolve, breaking all my Python installs. I’m also seeing this issue since installing 1.12.3-beta30, although this was a full reinstall rather than an upgrade. I was unable to build a Rails application image that was installing gems from our private source.

I was able to build the image once I changed the url in the Gemfile to the ec2 server address. However, when running the container I’m getting errors when making some http calls. The errors appear as “Name or service not known” so it seems like a similar DNS issue. The routes that I know are affected are services that are hosted on AWS and have DNS defined through route 53.