Windows 10 (19044_1706) offline installation of wsl and Docker pit filling records

Windows 10 (19044_1706) offline installation of wsl and Docker pit filling records

1. Environment

  • windows10 (x64 build 19044_1706)
  • docker v4.10.1
  • wsl2

2. Relevant information

Three, linux release version offline installation package download

Ubuntu 18.04 is about 200M smaller, and Debian is not bigger than 160M

4. Install Ubuntu 18.04 offline

  • Download the Ubuntu_1804.2019.522.0_x64.appx file through the link above
  • Copy the file to the C:\wlsApps\ directory (it is recommended to put it on the c drive, I forgot where I saw the reminder~~~)
  • There are three methods for offline installation (find the one that is most suitable for your computer environment, my method three is installed successfully, and the windows environment is messy, so I don’t know where it is stuck~~~)
    • The first method: Open powershell and switch to the wlsApps directory, execute: Add-AppPackage .\Ubuntu_1804.2019.522.0_x64.appx ;
    • The second method: double-click the Ubuntu_1804.2019.522.0_x64.appx file directly;
    • The third method: modify the suffix to .zip, and run the ubuntu1804.exe file after decompression;
  • Verify whether the installation is successful, execute the wsl -l -v command, and see that Ubuntu-1804 is successful in the following output:
>wsl -l -v
  NAME                   STATE           VERSION
* docker-desktop-data    Stopped         2
  docker-desktop         Running         2
  Ubuntu-18.04           Running         2  
  • If you see that there is no * in front of Ubuntu-18.04, you need to execute the command to set the default release version:
>wsl --set-default Ubuntu-18.04
--再次执行看到 Ubuntu-18.04 已经为默认发行版本了
>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-18.04           Stopped         2
  docker-desktop-data    Stopped         2
  docker-desktop         Running         2
  • Execute the command wsl to enter the ubuntu system, exit and enter exit

5. Problems encountered

  • Wsl startup reports an error "The object type of the reference does not support the attempted operation"
  • Running docker crashes
  • Run docker prompt: Docker Desktop stopping...
  • Running docker prompt: Failed to set version to docker-desktop: exit code: -1

Let me talk about the reasons for the above problems first: it is because the proxy software used on the computer causes a port conflict with wsl2.
The first method (not recommended):
Use a command prompt or a windows terminal to execute this command in administrator mode, and then restart WSL2.
netsh winsock reset
This command will reset the winsock network protocol, which will cause the proxy software (proxifier )not available!

The second method (recommended):
Use the NoLsp.exe program operating system registry to achieve mutual compatibility of the whitelist mode;
we have a tool that can make this call (here I provide three download links for everyone to download):
https: //www.proxifier.com/tmp/Test20200228/NoLsp.exe
https://xaizai.lanzouo.com/iRZ7szooksb
https://share.weiyun.com/ogl07Rc5

Run cmd as an administrator, switch to the NoLsp.exe directory, and execute the following command with the full path of wsl.exe as a parameter:

NoLsp.exe c:\windows\system32\wsl.exe

The above command will write some values ​​in the registry, and the written content is in the following location:

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3
    AppFullPath = c:\windows\system32\wsl.exe   --类型 REG_SZ
    PermittedLspCategories = 80000000           --类型 REG_DWORD

6. Summary

The installation of docker needs to configure the wsl environment of windows first, and it is recommended to use the documentation of windows for step-by-step operation when configuring.
Since the local network cannot access the windows application store, the linux release version can only be installed manually, and three installation methods have been sorted out.
Since the machine uses the proxifier software, the installation of wsl, subsystems, and docker are all problems. Summarize the problems to avoid latecomers stepping into the pit.

Guess you like

Origin blog.csdn.net/xxj_jing/article/details/125887815