A few weeks ago I moved my development to Docker. Today I was preparing my development environment to be able to work from an office with limited access to the Internet.
I was trying to provision containers using my Android phone as an Internet link.
The connection failed initially
EduardoMacBookPro: eduardoshanahan$ docker-compose -f dc-Adapters.yml build Building kafka_event_adapter... Step 0 : FROM node Pulling repository docker.io/library/node Service 'kafka_event_adapter' failed to build: Error while pulling image: Get https://index.docker.io/v1/repositories/library/node/images: dial tcp: lookup index.docker.io on 188.8.131.52:53: read udp 184.108.40.206:53: no route to host
To fix it, I edited /etc/resolv.conf and added
nameserver 220.127.116.11 nameserver 18.104.22.168
After it I had to flush the DNS cache
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
and restart docker-machine
docker-machine restart default
The connection is slow compared with my normal wifi, but it allows me to work on my own when not at home or the office.