Installing Docker on a Windows workstation

The Windows version of Docker CE is compatible with Windows 10 Pro or Enterprise editions. Docker CE on Windows provides a complete Docker development solution by integrating with Windows Hyper-V virtualization and networking. Docker CE on Windows supports creating and running both Windows and Linux containers. Docker CE on Windows is available from the Docker store at https://store.docker.com/editions/community/docker-ce-desktop-windows. 

You will need to log in to the Docker store to download the Docker CE for Windows installer, so if you don't already have an account, go ahead and create one now and then log in to it. 

Be sure to save your Docker credentials securely as you will be using them a lot in the future.

After logging in, you should see the Get Docker download button. Click on the download button and allow the installer to download to your workstation. Once the installer has finished downloading, you can click the Run button to begin the installation. If you get the security check, confirm that you want to run the installer executable by clicking the Run button. If you have UAC enabled on your workstation, you may see the User Account Control warning asking you to confirm that you want to allow the Docker CE installer to make changes to your device. You have to check Yes to continue, so go ahead and click it now.

The Docker CE installer will run and it will begin downloading Docker. Once the Docker installation files have been successfully downloaded, the installer will ask you to confirm your desired configuration. The options here are few. It is my recommendation that you add the shortcut to the desktop and that you do not check the Use Windows containers instead of Linux containers option:

The installer will unpack the Docker CE files. When the files are unpacked, you will get the Installation succeeded notification. According to the current documentation, the installer will run Docker for you at the end of the installation. It has been my experience that it does not always happen. Be patient and give it time, but if it does not start that first time you may have to run Docker manually.

If you selected the configuration option to add a shortcut for Docker to your desktop, you will now be able to double-click that shortcut icon and start Docker for the first time.

Docker will run and you will get a Welcome screen that lets you know that Docker is up and running. It is recommended that you provide your Docker credentials and log in at this time.

Whenever Docker is running, you will see a whale icon in the taskbar notifications area. If you mouse over that icon, you can get the status of the Docker process. You will see such statuses as Docker is starting and Docker is running. You can right-click on the icon to bring up the Docker for Windows menu:

Once you have Docker running on your Windows workstation, you can open up a Windows PowerShell command window and start using Docker. To verify that the installation was completed successfully, open a PowerShell window and enter the version command. To confirm that Docker is working as desired, run the hello-world Docker container:

# validate install and functionality
docker --version

docker run hello-world

Your Windows 10 workstation is now set up to create Docker images and run Docker containers. Docker should also be configured to start up on boot so that when you need to reboot your workstation, it will start up automatically.

Be aware that using Docker CE on a Windows workstation is not exactly like using Docker CE on a Linux workstation. There is an additional layer of virtualization this is hidden behind the scenes. Docker is running a small Linux VM in Hyper-V and all of your Docker interactions are passed through, to, and from, this Linux VM. For most use cases, this is never going to present any issues, but it does affect performance. We will talk more about this in the Discovering the differences to watch out for between OSes section.

There is one more bit of setup that we want to take a look at, so if you are ready, jump right into the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset