Windows Docker Installation

Windows Docker Installation

Docker is not a generic container tool, it relies on an existing and running Linux kernel environment.

Docker essentially creates an isolated file environment under an already running Linux, so it performs almost as efficiently as the Linux host it is deployed on.

Therefore, Docker must be deployed on a system with a Linux kernel. If other systems want to deploy Docker, they must install a virtual Linux environment.

Windows Docker Installation

The way to deploy Docker on Windows is to first install a virtual machine and run Docker in the virtual machine where the Linux system is installed.

Installing Docker on Win10 systems

Docker Desktop is the official installation method for Docker on Windows 10 and macOS operating systems. This method is still the same as installing Linux in a virtual machine and then installing Docker.

Docker Desktop official download address: https://hub.docker.com/editions/community/docker-ce-desktop-windows

Note: This method only works with Windows 10 OS Professional, Enterprise, Education and some Home editions!

Install Hyper-V

Hyper-V is a virtual machine developed by Microsoft, similar to VMWare or VirtualBox, for Windows 10 only. this is the virtual machine used by Docker Desktop for Windows.

However, once this virtual machine is enabled, QEMU, VirtualBox or VMWare Workstation 15 and below will not work! If you must use another virtual machine on your computer (such as an emulator that you must use to develop Android apps), do not use Hyper-V!

Enabling Hyper-V

To enable Hyper-V by command, right-click the Start menu and run PowerShell as administrator, and execute the following command.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Install Docker Desktop for Windows

Click Get started with Docker Desktop and download the Windows version. If you are not logged in yet, you will be asked to register for a login.

Run the installation file

Double-click the downloaded Docker for Windows Installer installation file, go all the way to Next, and click Finish to complete the installation.

Windows Docker Installation

Windows Docker Installation

After the installation is complete, Docker will start automatically. A small whale icon will appear on the notification bar, which indicates that Docker is running.

Three icons will also appear on the side of the table, as shown in the following image.

We can execute docker version at the command line to see the version number and docker run hello-world to load a test image to test it.

If it doesn’t start, you can start it by searching for Docker in Windows at

Windows Docker Installation

Once launched, you can also see the small whale icon on the notification bar:.

Windows Docker Installation

If you encounter a ground error due to WSL 2 during startup, please install WSL 2.

Once installed, you can open PowerShell and run the following command to check if it ran successfully.

docker run hello-world

After a successful run the following message should appear:

Windows Docker Installation

Win7/Win8 system to install Docker

Win7, Win8, etc. need to use docker toolbox to install, domestic can use the Ali cloud image to download, download address: http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/

The installation is relatively simple, double-click to run, click the next step can be, you can check the components you need: ## Win7/Win8 system installation:

Windows Docker Installation

The docker toolbox is a toolset that contains some of the following.

  • Docker CLI – Client to run the docker engine to create images and containers.
  • Docker Machine – Allows you to run docker engine commands from the Windows command line.
  • Docker Compose – Used to run the docker-compose command.
  • Kitematic – This is the GUI version of Docker.
  • Docker QuickStart shell – This is a command line environment with Docker already configured.
  • Oracle VM Virtualbox – The virtual machine.

Click Install directly after the download is complete. After successful installation, three icons will appear on the table, as shown below.

Windows Docker Installation

Click the Docker QuickStart icon to start the Docker Toolbox terminal.

If the system displays the User Account Control window to run VirtualBox to modify your computer, select Yes.

Windows Docker Installation

The $ symbol there can be executed by entering the following command.

$ docker run hello-world
 Unable to find image 'hello-world:latest' locally
 Pulling repository hello-world
 91c95931e552: Download complete
 a8219747be10: Download complete
 Status: Downloaded newer image for hello-world:latest
 Hello from Docker.
 This message shows that your installation appears to be working correctly.

 To generate this message, Docker took the following steps:
  1. The Docker Engine CLI client contacted the Docker Engine daemon.
  2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub.
     (Assuming it was not already locally available.)
  3. The Docker Engine daemon created a new container from that image which runs the
     executable that produces the output you are currently reading.
  4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
     to your terminal.

 To try something more ambitious, you can run an Ubuntu container with:
  $ docker run -it ubuntu bash

 For more examples and ideas, visit:
  https://docs.docker.com/userguide/
Like(1)