Windows Docker installation
Docker is not a universal container tool; it relies on an existing and running Linux kernel environment.
In essence, Docker creates an isolated file environment on top of an already running Linux, so its execution efficiency is almost equal to that of the deployed Linux host.
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.

The methods for deploying Docker on Windows all involve first installing a virtual machine, then running Docker in the virtual machine with Linux installed.
Win10 system
Docker Desktop is Docker's official installation method on Windows 10 and macOS operating systems; this method still belongs to the approach of first installing Linux in a virtual machine and then installing Docker.
Docker Desktop official download address: https://docs.docker.com/desktop/install/windows-install/
** Note:** This method only applies to the Pro, Enterprise, Education, and some Home editions of the Windows 10 operating system!
Install Hyper-V
Hyper-V is a virtual machine developed by Microsoft, similar to VMWare or VirtualBox, and only available on Windows 10. 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 be unusable! If you must use other virtual machines on your computer (such as emulators required for Android app development), do not use Hyper-V!
Enable Hyper-V

Programs and Features

Turn Windows features on or off

Select Hyper-V

You can also enable Hyper-V via a command; right-click the Start menu, 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 have not logged in yet, you will be asked to register and log in:

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


After installation, Docker starts automatically. A little whale icon appears in the notification area
, which indicates that Docker is running.
Three icons will also appear on the desktop, as shown in the figure below:
We can run docker version in the command line to check the version number, and docker run hello-world to load and test a test image.
If it has not started, you can search for Docker in Windows to start it:

After starting, you can also see the little whale icon in the notification area:

If you encounter an error caused by WSL 2 during startup, please install WSL 2。
After installation, you can open PowerShell and run the following command to check whether it runs successfully:
docker run hello-world
After a successful run, the following information should appear:

win7 and win8 systems
win7, win8, and others require docker toolbox for installation; in China you can use the Alibaba Cloud mirror to download. Download address:http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/
Installation is fairly simple: just double-click to run and click Next; you can select the components you need:

docker toolbox is a toolset that mainly contains the following:
- Docker CLI - the client, used to run the docker engine to create images and containers.
- Docker Machine - allows you to run docker engine commands in the Windows command line.
- Docker Compose - used to run docker-compose commands.
- Kitematic - this is the GUI version of Docker.
- Docker QuickStart shell - this is a command-line environment already configured with Docker.
- Oracle VM Virtualbox - a virtual machine.
After the download is complete, click to install directly; after successful installation, three icons will appear on the desktop, as shown in the figure below:
![]()
Click the Docker QuickStart icon to launch the Docker Toolbox terminal.
If the system displays a User Account Control window to run VirtualBox and modify your computer, select Yes.

At the $ prompt, you can enter the following command to execute.
$ 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/