Docker desktop window10 home version pitfall record

Install

Desktop version: https://www.docker.com/products/docker-desktop
Here I installed the desktop version and selected windows.Insert image description here

Preliminary work

1. Press win+s (find this)
Insert image description here

Check the box below. If you are a home version, you may not have this thing, so please read my article. This article teaches you how to install it.
Insert image description here

https://blog.csdn.net/SpongeBob_shouse/article/details/128761045?spm=1001.2014.3001.5502

2. Check the items in the screenshot below
Insert image description here

If not, follow the steps below.
Open Microsoft store
to download ubantu
Insert image description here

If you cannot open Ubuntu after downloading, you need to check to see if your wsl version is 1 or 2.
If it is 2, you will not be able to open it.
Check whether your version is installed successfully
Insert image description here

Note that this version needs to be version 2.
Here’s how to upgrade .

 wsl -l -v 查看当前的版本
wsl.exe --set-version Ubuntu 2 升级为2的版本

3. If you follow me and complete the above operations,
open your docker container
and select the settings in the upper left corner, but you may always be in the loading process.
Insert image description here

If you enter the settings page and it is always loading,
like me, enter the following command under your powershell.
If it is still loading after the input is completed, you can close your docker desktop and try opening it again. If
it doesn't work, try a few more times.

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

Then when you can successfully enter.
Insert image description here

Find this page and copy the following code into it. Here we will help you configure the docker image.

{
    
    
  "builder": {
    
    
    "gc": {
    
    
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "features": {
    
    
    "buildkit": true
  },
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn",
    "http://hub-mirror.c.163.com",
    "https://registry.docker-cn.com"
  ]
}

4. At this time, try to start your redis. If it succeeds, it means it is OK.
Insert image description here

Record your own pitfalls! ! ! ! !

Guess you like

Origin blog.csdn.net/SpongeBob_shouse/article/details/128762232