{"id":3146,"date":"2015-05-25T07:58:35","date_gmt":"2015-05-25T07:58:35","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=3146"},"modified":"2016-04-09T18:59:31","modified_gmt":"2016-04-09T18:59:31","slug":"lookup-index-docker-io-no-dns-servers-error","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/lookup-index-docker-io-no-dns-servers-error\/","title":{"rendered":"lookup index.docker.io no DNS servers error"},"content":{"rendered":"<p>I&#8217;ve been learning Docker lately and all was working well, then today I started seeing the following error <em>lookup index.docker.io no DNS servers error<\/em> when trying to pull a docker container from Docker Hub. Very strange as this worked fine previously.<\/p>\n<p>For the record, I was able to use apt-get to update packages and I could ping the index.docker.io address, so I&#8217;m not sure what changed to make this break.<\/p>\n<p>Anyway to solve the problem we can simply append <em>dns-nameservers<\/em> to the file \/etc\/network\/interfaces<\/p>\n<p>For example<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nauto lo\r\niface lo inet loopback\r\n\r\nauto eth0\r\niface eth0 inet static\r\naddress 192.x.x.x\r\nnetmask 255.255.255.0\r\ngateway 192.x.x.1\r\ndns-nameservers 8.8.8.8 8.8.4.4\r\n<\/pre>\n<p>In the above I&#8217;ve added the loopback and two google name servers to the interfaces file.<\/p>\n<p>To activate these changes (without a reboot) just use<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nifdown eth0 &amp;&amp; ifup eth0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been learning Docker lately and all was working well, then today I started seeing the following error lookup index.docker.io no DNS servers error when trying to pull a docker container from Docker Hub. Very strange as this worked fine previously. For the record, I was able to use apt-get to update packages and I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[102,74],"tags":[],"class_list":["post-3146","post","type-post","status-publish","format-standard","hentry","category-docker","category-networking"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=3146"}],"version-history":[{"count":3,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3146\/revisions"}],"predecessor-version":[{"id":3772,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3146\/revisions\/3772"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=3146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=3146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=3146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}