Easy Tutorial
❮ Docker Port Command Docker Search Command ❯

Windows Docker Installation

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

Docker essentially creates an isolated file environment under an already running Linux system, so its execution efficiency is almost equivalent to 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 method to deploy Docker on Windows is to first install a virtual machine and then run Docker within a virtual machine that has Linux installed.

Win10 System

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

Docker Desktop official download address: https://docs.docker.com/desktop/install/windows-install/

Note: This method is only applicable to Windows 10 Professional, Enterprise, Education, and some Home editions!

Install Hyper-V

Hyper-V is a virtual machine developed by Microsoft, similar to VMWare or VirtualBox, and is only available for 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 not be usable! If you must use other virtual machines on your computer (such as simulators required for developing Android applications), do not use Hyper-V!

Enable Hyper-V

You can enable Hyper-V through the Programs and Features section in Control Panel or by running the following command in PowerShell as an administrator:

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

Install Docker Desktop for Windows

Click Get started with Docker Desktop and download the Windows version. You will be asked to register and log in if you haven't already.

Run the Installer

Double-click the downloaded Docker for Windows Installer file, proceed through the installation with Next, and finish by clicking Finish.

After installation, Docker will automatically start. A small whale icon will appear in the notification area.

Three icons will also appear on the desktop, as shown below.

You can check the version number by running docker version in the command line and load a test image with docker run hello-world.

If it doesn't start, you can search for Docker in Windows to start it.

After starting, you can also see the small whale icon in the notification area.

If you encounter errors due to WSL 2 during startup, please install WSL 2.

After installation, you can open PowerShell and run the following command to check if it runs successfully:

docker run hello-world

After successfully running, you should see the following information:


Win7, Win8 Systems

For Win7, Win8, etc., Docker Toolbox needs to be installed. You can use Alibaba Cloud's mirror to download it. Download address: http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/

The installation is straightforward; double-click to run, click Next, and select the components you need.

Docker Toolbox is a collection of tools that mainly includes the following:

After downloading, click to install. After successful installation, three icons will appear on the desktop.

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

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

You can input the following command at the $ prompt:

$ 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/
❮ Docker Port Command Docker Search Command ❯