Today I learned about networking and DNS with Docker containers:

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.