Today I learned about networking and DNS with Docker containers:
- Docker Networking and DNS: The Good, The Bad, And The Ugly
- Fix Docker’s networking DNS config
- Docker containers can’t resolve DNS on Ubuntu 14.04 Desktop Host
I’ve hard-coded the DNS servers into: /etc/docker/daemon.js
:
{
"dns": ["1.0.0.1", "1.1.1.1"]
}
Now, restart Docker daemon. Then you should be able to connect to the internet from within your Docker container.