English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Docker is not a general-purpose container tool; it depends on an existing and running Linux kernel environment.
Docker actually creates an isolated file environment under the already running Linux, so its execution efficiency is almost equivalent to the host machine on which it is deployed.
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 to deploy Docker on Windows are all to install a virtual machine first, and then run Docker in a virtual machine with a Linux system installed.
Docker Desktop is Docker on Windows 10 and the official installation method on macOS operating system, this method still belongs to the method of installing Linux in a virtual machine first and then installing Docker.
The official download address of Docker Desktop:https://hub.docker.com/editions/community/docker-ce-desktop-windows
Note:This method is only applicable to Windows 10 Professional Edition, Enterprise Edition, Education Edition, and some Home Editions!
Hyper-V is a virtual machine developed by Microsoft, similar to VMWare or VirtualBox, and is only applicable to 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 versions will not be able to use! If you must use other virtual machines on your computer (such as emulators required for developing Android applications), please do not use Hyper-V!
Programs and Features
Enable or disable Windows features
Select Hyper-V
You can also enable Hyper through the command-V, please right-click the Start menu and run PowerShell as an administrator, execute the following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Click Get started with Docker Desktop, and download the Windows version, if you have not logged in, you will be prompted to register and log in:
Double-click the downloaded Docker for Windows Installer installation file, click Next all the way, and click Finish to complete the installation.
After the installation is completed, Docker will automatically start. A little whale icon will appear in the notification area, indicating that Docker is running.
Three icons will also appear on the desktop as shown in the following figure:
We can execute docker version in the command line to view the version number, docker run hello-world to load the test image for testing.
If it is not started, you can search for Docker in Windows search to start:
After the startup, you can also see the little whale icon in the notification area:
If you encounter an error during startup due to WSL 2 causes an error, please install WSL 2.
The operation of Docker is done through the command line, so we need to open the command line tool first (or download other tools such as PowerShell, etc.). Keyboard input: win+R, open the Run utility, input cmd, open the command line tool:
Check our Docker version:
win7、win8 The following need to use docker toolbox for installation, and domestically, you can use Aliyun's mirror to download, the download address is:http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/
安装比较简单,双击运行,点下一步即可,可以勾选自己需要的组件:
Docker Toolbox是一个工具集,它主要包含以下一些内容:
Docker CLI - 客户端,用来运行docker引擎创建镜像和容器。
Docker Machine - 可以在Windows的命令行中运行docker引擎命令。
Docker Compose - 用来运行docker-compose命令。
Kitematic - 这是Docker的GUI版本。
Docker QuickStart shell - 这是一个已经配置好Docker的命令行环境。
Oracle VM Virtualbox - 虚拟机。
下载完成后直接点击安装,安装成功后,桌面上会出现三个图标,如下图所示:
点击Docker QuickStart图标来启动Docker Toolbox终端。
如果系统显示用户账户控制窗口来运行VirtualBox修改你的电脑,选择是。
$ 符号那里你可以输入以下命令来执行。
$ docker run hello-world 无法找到镜像'hello-world:latest'本地 正在拉取仓库hello-world 91一个95931一个552:下载完成 一个8219747是10:下载完成 状态:已下载hello的新镜像-world:latest 来自Docker的问候。 此消息显示您的安装似乎正在正常工作。 为了生成此消息,Docker采取了以下步骤: 1。Docker Engine CLI客户端联系了Docker Engine守护进程。 2。Docker Engine守护进程拉取了"hello-来自Docker Hub的'world'镜像。 (假设它尚未本地可用。) 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/