After upgrade, docker cannot communicate with the outside world

One thing that I’ve noticed recently in Ubuntu 20 on DigitalOcean is that the host machine doesn’t make its domain name servers available to Docker. This is not an issue with the firewall because Ubuntu 20 doesn’t come with the firewall enabled.

To fix, first find the DO name servers with cat /run/systemd/resolve/resolv.conf. You’ll see something like this…


Next, edit the daemon.json file with nano /etc/docker/daemon.json to make those nameservers, and optionally, the Google DNS ( are available to Docker.

    "dns": ["<ip1 from above>", "<ip2 from above>", ""]

Then restart Docker and rebuild.

systemctl restart docker
/var/discourse/launcher rebuild app