Difference between revisions of "Docker - Error: Docker build “Could not resolve deb.debian.org""

(Created page with "How to fix the error: <pre>Err:1 http://deb.debian.org/debian stretch InRelease Temporary failure resolving 'deb.debian.org'</pre> which is caused by ruining Docker build. <br...")
 
(No difference)

Latest revision as of 02:58, 31 October 2019

How to fix the error:

Err:1 http://deb.debian.org/debian stretch InRelease
Temporary failure resolving 'deb.debian.org'

which is caused by ruining Docker build.
Add a DNS server to this file. You can also use the Cloudflare DNS (1.1.1.1) or Google DNS (8.8.8.8):

vim /etc/docker/daemon.json
{
    "dns": ["1.1.1.1", "8.8.8.8"]
}

Restart now the Docker service:

sudo service docker restart

Now, you can run your command again.