{"id":2867,"date":"2020-12-18T16:27:15","date_gmt":"2020-12-18T14:27:15","guid":{"rendered":"http:\/\/www.tekstadventure.nl\/branko\/blog\/?p=2867"},"modified":"2020-12-19T03:22:38","modified_gmt":"2020-12-19T01:22:38","slug":"two-notes-on-using-docker-in-2020-on-a-non-vanilla-windows-10-home-system","status":"publish","type":"post","link":"https:\/\/www.tekstadventure.nl\/branko\/blog\/2020\/12\/two-notes-on-using-docker-in-2020-on-a-non-vanilla-windows-10-home-system","title":{"rendered":"Two notes on using Docker in 2020 on a non-vanilla Windows 10 Home system"},"content":{"rendered":"<p>A couple of things I ran across today when trying to install Docker on Windows 10 Home.<\/p>\n<p>All the documentation I have run across so far seems to assume that you have a freshly installed Windows. <\/p>\n<p>Docker for Windows 10 Home in 2020 is basically Docker for Linux ran through the WSL (Windows Subsystem for Linux) VM. <\/p>\n<p>WSL seems very nice, though it takes up a fair chunk of disk space. The only caveat I ran into so far as is that you are strongly recommended to use the Linux file system when working on the Linux side, so that side of the set-up is not as transparent as one might have hoped.<\/p>\n<p>If you previously toyed with or used Docker on Windows, you need to uninstall the old Docker before you can install the new one (even though the new one runs on a different &#8216;machine&#8217;).<\/p>\n<p>This works just as with any Windows program, so far so good. <\/p>\n<p><strong>Note 1.<\/strong> The Docker uninstall does not uninstall everything and the things it leaves behind <em>will<\/em> conflict with the new Docker. I kid you not.<\/p>\n<p>The error message you get is something like &#8220;could not read CA certificate&#8221;.<\/p>\n<p>I had to a) <a href=\"https:\/\/stackoverflow.com\/questions\/49679818\/docker-could-not-read-ca-certificate\">manually remove two sets of environment variables<\/a> and then b) restart Windows. Unlike the winning answer I did not have to uninstall Virtualbox.<\/p>\n<p>Once you have done that, Docker will run just fine. So you start playing with the tutorial, only to find out that:<\/p>\n<p><strong>Note 2.<\/strong> The Docker tutorial binds to localhost.<\/p>\n<p>Which in my case meant I could not see the tutorial, because I had already bound <em>localhost<\/em> on my host machine (Windows) to a XAMPP. <\/p>\n<p>On the Linux VM, <em>localhost<\/em> gets &#8216;correctly&#8217; bound to the Docker container, so at least that was a relief. (I found out through installing and running the Lynx web browser. I guess I could have used <em>curl<\/em>.)<\/p>\n<p>In the WSL documentation, under Comparing WSL 1 and WSL 2, sub-section <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/compare-versions#accessing-linux-networking-apps-from-windows-localhost\">Accessing Linux networking apps from Windows (localhost)<\/a>, it is explained how to find out the IP address of the Linux VM (in your VM&#8217;s shell enter &#8216;ip addr&#8217; and use the <em>inet<\/em> value of the <em>eth0<\/em> entry) and you can use that to access your container&#8217;s web server from the host system. I don&#8217;t know if this address persists across sessions.<\/p>\n<p>Disclaimer: I may have set up things incorrectly, in which case this memo will send the unaware reader googling for help even further into the woods. Certainly that would explain why I haven&#8217;t found any documentation on especially the second issue. In that case, please let me know in the comments where I went wrong.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A couple of things I ran across today when trying to install Docker on Windows 10 Home. All the documentation I have run across so far seems to assume that you have a freshly installed Windows. Docker for Windows 10 Home in 2020 is basically Docker for Linux ran through the WSL (Windows Subsystem for &#8230; <a href=\"https:\/\/www.tekstadventure.nl\/branko\/blog\/2020\/12\/two-notes-on-using-docker-in-2020-on-a-non-vanilla-windows-10-home-system\" class=\"excerpt-read-more read-more\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[83,85,84],"class_list":["post-2867","post","type-post","status-publish","format-standard","hentry","category-general","tag-docker","tag-localhost","tag-wsl"],"_links":{"self":[{"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/posts\/2867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/comments?post=2867"}],"version-history":[{"count":0,"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/posts\/2867\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/media?parent=2867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/categories?post=2867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tekstadventure.nl\/branko\/blog\/wp-json\/wp\/v2\/tags?post=2867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}