Two notes on using Docker in 2020 on a non-vanilla Windows 10 Home system

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 Linux) VM.

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.

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 ‘machine’).

This works just as with any Windows program, so far so good.

Note 1. The Docker uninstall does not uninstall everything and the things it leaves behind will conflict with the new Docker. I kid you not.

The error message you get is something like “could not read CA certificate”.

I had to a) manually remove two sets of environment variables and then b) restart Windows. Unlike the winning answer I did not have to uninstall Virtualbox.

Once you have done that, Docker will run just fine. So you start playing with the tutorial, only to find out that:

Note 2. The Docker tutorial binds to localhost.

Which in my case meant I could not see the tutorial, because I had already bound localhost on my host machine (Windows) to a XAMPP.

On the Linux VM, localhost gets ‘correctly’ 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 curl.)

In the WSL documentation, under Comparing WSL 1 and WSL 2, sub-section Accessing Linux networking apps from Windows (localhost), it is explained how to find out the IP address of the Linux VM (in your VM’s shell enter ‘ip addr’ and use the inet value of the eth0 entry) and you can use that to access your container’s web server from the host system. I don’t know if this address persists across sessions.

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’t found any documentation on especially the second issue. In that case, please let me know in the comments where I went wrong.

Leave a Reply

Your email address will not be published.