Issues when changing between networks

Expected behavior

When changing between different connections (in my case wi-fi at home, office, coffee shop etc) new Docker containers have incorrect networking settings.

Actual behavior

Occasionally docker containers will have weird networking issues, such as inability to connect to yum/apt repositories.

So the example that I’ve experienced (including a few minutes ago) is open MacBook, connect to wifi, try to run a new container, hits issue such as:

wget -O /tmp/puppet.deb
  Resolving (   failed: Name or service not known.
  wget: unable to resolve host address ''

Restarting Docker and running container again solves the issue.


  • OS X: version 10.11.4 (build: 15E65) 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

Steps to reproduce the behavior

Not sure the best way to reproduce, Macbook and change between different wi-fi connections?