Installing Docker Desktop on Windows 10 Pro

Want to run Docker containers on your Windows 10 Pro machine? Very easy, just install Docker for Windows and start build, ship and run containerized apps right there on your Windows 10 PC.

Docker comes with two editions, which are the Enterprise Edition (EE) which is designed for enterprise development in production and at large scale, and the Community Edition (CE) which is intended to be used by individual developers to experiment and testing purpose.

The thing with Docker, regardless of which edition you’re using, is that if your container runs and passes all your crazy tests on your development machine, then it will run anywhere else with no changes needed to be done. As such, you do have the possibility to move your containerized app from your own machine to any destination server, should be on-premise or in the cloud, without affecting the underlying code, and that’s the base model of DevOps, which allows you to deploy your infrastructure without giving much importance to the applications that will run on top of it. You deploy your infrastructure separately from your applications, and you manage them separately as well.

In this post, we will go through the steps to install and use Docker Desktop Community Edition (CE) in Windows 10 Pro. Docker Desktop is an easy-to-install application for your Mac or Windows environment that enables you to start containerizing your application in a very easy manner

Consider this before Installation


If not previously installed, Docker for Windows will install and run Hyper-V on your Windows 10 as it is a required component. If you’re using any virtualization platform like VMware Workstation or Oracle VM Virtualbox, this will cause these programs to stop working. Your previously created VMs will still be there but you will not be able to start them using these hypervisors. This might not be a big deal for you since you can always use a conversion tool like Microsoft Virtual Machine Converter (MVMC) to convert your VMs to be used in Hyper-V. Having said that, prevention is better than cure.

Installing Docker for Windows on Windows 10 Pro


Checking the Prerequisites

  • Virtualization must be enabled. To check this, launch the Task Manager and click on the CPU pane from the Performance tab.

If virtualization is not enabled on your system, check your BIOS manufacturer user guide on how to do it.

  • Requires Microsoft Windows 10 Professional or Enterprise 64-bit. Check your system properties to know if your system is a 64-bit.

If you are running a Windows Home, a 32-bits system or a prior version of Windows, consider using Docker Toolbox instead.

Downloading Docker for Windows

Docker Desktop is available for Windows and for Mac. Click on Download Docker for Windows.

You will then be redirected to the Docker Community Edition for Windows. Click on Get Docker and save the file.

Installing Docker for Windows

Double-click InstallDocker.msi to run the installer and follow the instruction steps.

Because Docker does not start automatically after you log in, you will need to start it from the Start menu and make sure you do it as Administrator because privileged access is needed to install networking components, Containers capabilities and Hyper-V VMs.

You will need to click on OK to install the required features. your machine will be restarted after the installation.

After the restart, check the the whale icon in the Notifications area, the “Docker is starting” should be appear. Depending on your system performance, it might take some time to fully start.

In the background, Hyper-V has been installed and a VM called MobyLinuxVM has been created and started. Your Linux containers run inside this Linux thin VM that runs within Hyper-V on your Windows 10 machine.

After some time, you will see the whale in the status bar turns to steady state. That means that Docker is up-and-running, and accessible from any terminal window, like PowerShell or CMD.

When everything is started and initialized, you will get a popup success message with suggested next steps, and a link to the official documentation.

 

Congratulations! You are now ready to run container with Docker for Windows on your Windows 10 Pro machine.

What Really Happened in the Background?


Docker for Windows is using Hyper-V to run the Moby VM, based on toolkit called LinuxKit to run Linux images. LinuxKit provides a container based Linux OS. Consequently, and because we are on Windows 10 machine, Hyper-v has been installed and the Moby VM was created and started to run Linux containers on Windows.

On the other hand, Windows Server Containers run Windows binaries on the same host OS, similar to how Linux containers run on a Linux OS, so they do not need the Moby VM. To run Windows containers on a Windows host, the Containers has also been installed.

You can confirm that these functionalities have effectively been installed by checking the Windows features installed on your system on Control Panel > Programs > Programs and Features > Turn Windows features on or off.

Creating Docker Containers in Windows


Now that Docker is installed, you will be able to run containers by running a terminal tool (Command Prompt or PowerShell). You can start by getting some useful information about the Docker version installed with the following command:

Let’s try to deploy Azure Command Line runtime with a Docker container. The Azure CLI is Microsoft’s cross-platform command-line experience for managing Azure resources, that can be installed on Windows, Linux and MacOS. After which, you would be able to manage Azure resources through command-line.

However, by deploying a Docker Azure CLI container, we will be able to run those commands with no install on the host system. Let’s go ahead.

Because the image was not available in the host’s local registry, Docker went ahead and pulled the image form the Docker Hub then started the container.

There you have it! Your azure cli container is up and running. You can manage you Azure workloads as if you had Azure CLI installed locally on your machine.

Docker is a great and easy to learn platform to create containerized apps, and Docker for Windows is the best way to get started with Docker on you Windows 10 Pro machine.

Find this post interesting. Share it!

Leave a Comment

Your email address will not be published. Required fields are marked *