Install Docker under Windows 10

Environmental preparation

  1. Windows 10 64-bit: Professional Edition, Enterprise Edition or Education Edition (build 16299 or higher).

For Windows 10 Home, see Install Docker Desktop on Windows Home .

  1. Hyper-V and Containers Windows must be enabled.
    Insert picture description here

  2. To successfully run Client Hyper-V on Windows 10, the following hardware prerequisites need to be met:

  • 64-bit processor with second level address translation (SLAT)
  • 4GB system memory
  • BIOS-level hardware virtualization support must be enabled in the BIOS settings. Generally, virtualization is enabled, so I won’t introduce it in detail.
    Insert picture description here

For more information, see Virtualization .

Download and install

  1. The official download address , I chose the stable version, and the installation option is ok by default.
    Insert picture description here
  2. After startup, it will appear in the lower right corner of the desktop. After the mouse is placed on it, it will display Docker is running, which means the startup is successful.
    Insert picture description here

Possible errors

  • WSL 2 installation is incomplete.Insert picture description here
  1. First confirm that the Windows subsystem for Linux is turned on
    Insert picture description here

  2. Secondly download and update WSL
    Insert picture description here

  • Failed to set version to docker-desktop: exit code: -1
    Insert picture description here

  • Solution 1: Administrator permissions are executed in cmdnetsh winsock reset
    Insert picture description here

Analysis of the causes and solutions: the proxy software conflicts with the sock port of wsl2, use netsh winsock reset to reset and repair.

  • Solution 2: Download NoLsp.exe first , and then execute it as an administratorNoLsp.exe C:\windows\system32\wsl.exe

Proxifer developers explained as follows:
If Winsock LSP DLL is loaded into its process, wsl.exe will display this error. The simplest solution is to use WSCSetApplicationCategory WinAPI call to wsl.exe to prevent this. In the background, the call creates an entry for wsl.exe in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog.
This will tell Windows not to load the LSP DLL into the wsl.exe process

  • 'docker-machine' is not an internal or external command, nor is it a runnable program.
    Go to docker-machine on GitHub and download the required version. You can also use git bash to enter the following command
$ base=https://github.com/docker/machine/releases/download/v0.16.0 &&
  mkdir -p "$HOME/bin" &&
  curl -L $base/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" &&
  chmod +x "$HOME/bin/docker-machine.exe"

Guess you like

Origin blog.csdn.net/weixin_44112790/article/details/109850711