Updating the global docker configuration<\/strong><\/p>\n\n\n\nWhen you’ve found a server that works, let’s add it to the global configuration.<\/p>\n\n\n\n
Edit or create the daemon.json file:<\/p>\n\n\n\n
sudo nano \/etc\/docker\/daemon.json<\/code><\/pre>\n\n\n\nMy file looks like this:<\/p>\n\n\n\n
{\n \"dns\": [\"192.168.1.1\"]\n}<\/code><\/pre>\n\n\n\nThen we just need to restart the docker daemon:<\/p>\n\n\n\n
sudo service docker restart<\/code><\/pre>\n\n\n\nAnd we’re good to go!<\/p>\n\n\n\n
<\/p>\n\n\n\n
Happy developing!<\/strong><\/p>\n\n\n\n<\/p>\n\n\n\n
Full error log<\/strong><\/p>\n\n\n\nStep 2\/9 : RUN apt-get update && apt-get -y install cron httrack curl\n ---> Running in 9cd52019953d\nErr:1 http:\/\/archive.ubuntu.com\/ubuntu focal InRelease\n Temporary failure resolving 'archive.ubuntu.com'\nErr:2 http:\/\/security.ubuntu.com\/ubuntu focal-security InRelease\n Temporary failure resolving 'security.ubuntu.com'\nErr:3 http:\/\/archive.ubuntu.com\/ubuntu focal-updates InRelease\n Temporary failure resolving 'archive.ubuntu.com'\nErr:4 http:\/\/archive.ubuntu.com\/ubuntu focal-backports InRelease\n Temporary failure resolving 'archive.ubuntu.com'\nReading package lists...\nW: Failed to fetch http:\/\/archive.ubuntu.com\/ubuntu\/dists\/focal\/InRelease Temporary failure resolving 'archive.ubuntu.com'\nW: Failed to fetch http:\/\/archive.ubuntu.com\/ubuntu\/dists\/focal-updates\/InRelease Temporary failure resolving 'archive.ubuntu.com'\nW: Failed to fetch http:\/\/archive.ubuntu.com\/ubuntu\/dists\/focal-backports\/InRelease Temporary failure resolving 'archive.ubuntu.com'\nW: Failed to fetch http:\/\/security.ubuntu.com\/ubuntu\/dists\/focal-security\/InRelease Temporary failure resolving 'security.ubuntu.com'\nW: Some index files failed to download. They have been ignored, or old ones used instead.\nReading package lists...\nBuilding dependency tree...\nReading state information...\nE: Unable to locate package cron\nE: Unable to locate package httrack\nE: Unable to locate package curl<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Upon launching a new docker-compose setup, my Dockerfile suddenly had issues installing some packages, showing errors like: It took me some time to figure out what was happening, but this Medium post got me in the right direction. Somehow, when building, docker fails to run DNS queries. Debugging: what causes this? We can test the […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\n
Docker fails to connect with archive.ubuntu.com - Marinus Klasen<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n