The Noobs Guide to Installing Docker Desktop for Windows

I recently came across an article on “Running PowerShell Core in a Container“. This article tweaked my interest because it was a simple way to run PowerShell in a clean and isolated environment that could be used for testing without the need to spin up an entire VM. It could also be recreated much easier than an entire VM.

The examples in the previously referenced article use a command (docker.exe) which I didn’t have on my machine so the first order of business was to figure out how to run Docker on Windows 10. I headed over to Docker’s website (no, not the men’s clothing website). They have a docs page that’s specific on how to “Install Docker Desktop for Windows“. Definitely read through that page before proceeding because it contains specific information that will prevent you from experiencing problems. There’s information for VirtualBox users which I ignored since I don’t use it. Windows 10 64bit Pro, Enterprise, or Education is required along with being capable of running Hyper-V, and a minimum of 4Gb of RAM. My personal recommendation is a minimum of 8Gb of RAM. Based on information from that same webpage, there are also other possibilities of running Docker if you machine doesn’t meet these requirements.

This blog article demonstrates how to install Docker Desktop for Windows Community Edition (CE) on Windows 10. Based on Docker’s website, there also seems to be a Desktop Enterprise version. Download Docker Desktop for Windows. You’ll need to sign up for a free account and although you may find URL’s to download Docker without creating an account, you’ll need to sign into the software once installed so you’d only be avoiding the inevitable.

The only option I changed from the defaults during the install was to use Windows containers instead of Linux ones. This can also be changed after the install. If you want to run the code from the “Running PowerShell Core in a Container” article that I previously referenced, this needs to be set to “Linux” containers.

The install is mostly a clickersize.

Here’s a word to the wise: When you click “Close and log out” it does just that, it logs you out of Windows so be sure to save any data you may have open in any other applications!

I already had the Hyper-V feature enabled on my Windows 10 system so your mileage may vary during the installation process depending on your current system configuration. Once my system restarted, I launched Docker by clicking on its icon.

As I previously mentioned, you’ll need to login to Docker with the free account that you created during the download process.

There is a system tray icon which can be right clicked to bring up the menu shown in the following example. From it, you can switch to Linux or Windows Containers depending on which one it’s currently set to.

You’ll receive a confirmation message when switching container types.

At some point, I received the following message. Nothing to be alarmed about, but be sure to save any data in other open applications since as soon as you click “Ok”, your system will indeed restart as the message states.

At this point, simply open PowerShell as you normally would and you’ll be able to run the commands shown in this article to run PowerShell Core in a container.

µ

3 Comments

  1. Thomas Lee (@doctordns)

    Easy when you know how!

    I love what you can do with containers. Very cool stuff that I am only really getting into! Sadly, docker.exe has to be one of the most excreable UIs I’ve seen: no object orientation, non-helpful help, unactionable error messages, and most of the documentation assumes you are using Linux. Aside from that…

    We need MSFT (or someone else) to build decent docker focused cmdlets.

    Reply
  2. Roberth Strand

    Glad to hear that you got things working. It was never part of the scope of the article to explain how to get docker working, but I was thinking of it.

    I figured someone else would fill the gap and that someone was you. Thank you 🙂

    Reply
  3. Dani L

    docker run hello-world

    could not read CA certificate “C:\\Users\\User\\.docker\\machine\\machines\\default\\ca.pem”: open C:\Users\User\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

    Anybody knows about this issue?

    Reply

Leave a Reply to Roberth Strand Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: