Teach you how to install docker on windows 10 home edition

Teach you how to install docker on windows 10 home edition

When I wrote the Redis book and the Spring Cloud Alibaba book, I found that some distributed components are more suitable for installation in a Linux environment, and when building clusters such as Redis, a Linux environment is more necessary.

The machine I use for daily code practice and book writing runs on Windows 10 Home Edition. In order to simulate the Linux environment, one solution is to install Docker. When I first started installing it, I found that it couldn't be installed. Later, I asked others for help and searched for some methods on the Internet, and finally I succeeded in installing it.

I think this step was not very smooth and I solved several problems in the process. In this article, I will list the installation steps in detail and give methods to solve related problems for your reference.

The first step is to create a new txt file and change the suffix to .cmd. The content is as follows.

pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

Then run the above cmd file as an administrator. If prompted to restart, restart.

Step 2 : Check if Hyper-V is checked. If not, check it. This step may also require restarting the computer.

The third step is to open cmd as an administrator and run the command to modify the registry.

The specific method is to find cmd.exe in the C:\Windows\System32 directory, right-click, and select Run as administrator.

In the cmd command window, execute the following command to disguise the computer as win10 professional version by modifying the registry.

REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /TR
Please note that after modifying the registry with the above command, the value of the registry will be changed back the next time you restart the computer, so please install Docker immediately after the modification.

Step 4. Download and install docker from the official website.
The official website address is this: https://hub.docker.com/editions/community/docker-ce-desktop-windows

After the installation is complete, restart as prompted.

According to the instructions in many documents, the installation can be completed, but after the installation, I still encountered the following problems.

“WSL 2 installation is incomplete.”

This means that the wsl2 version I am using is old and I need to update it manually. According to the documents I found, I went to Microsoft's official website to download the latest version of wsl2.

The link address is this: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

After downloading the update, there are also problems similar to the following:

unable to resolve docker endpoint: open C:\Users\TomYuan\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.
The explanation on the Internet is that other versions of Docker have been installed on the computer before, and when I think about it, it is true.

The solution given online is: uninstall docker 19, delete the corresponding environment variables, delete the files under C:\Program Files\Docker, and reinstall docker

However, I only deleted the Docker-related environment variables as shown in the figure below, and just restarted Docker without uninstalling and installing it. Later, the problem was solved.

After installing docker, run the docker -v command and you can see the version number, which verifies that the installation was successful.

This is the end of this article about how to install docker on windows 10 home edition. For more information about installing docker on windows 10, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Install Docker for Windows on Windows 10 Home Edition
  • How to install WSL2 Ubuntu20.04 on Windows 10 and set up the docker environment
  • How to install Docker on Windows 10

<<:  Vue implements fuzzy query-Mysql database data

>>:  Solution to the problem of large font size on iPhone devices in wap pages

Recommend

CSS perfectly solves the problem of front-end image deformation

I saw an article in Toutiao IT School that CSS pe...

How to start and restart nginx in Linux

Nginx (engine x) is a high-performance HTTP and r...

Detailed explanation of the six common constraint types in MySQL

Table of contents Preface 1.notnull 2. unique 3. ...

Native JS to implement the aircraft war game

This article example shares the specific code of ...

VMware configuration hadoop to achieve pseudo-distributed graphic tutorial

1. Experimental Environment serial number project...

Vue implements Tab tab switching

This article example shares the specific code of ...

Simple implementation of vue drag and drop

This article mainly introduces the simple impleme...

Hide div in HTML Hide table TABLE or DIV content css style

I solved a problem tonight that has been botherin...

Summary of relevant knowledge points of ajax in jQuery

Preface Students who learn JavaScript know that A...

iframe adaptive size implementation code

Page domain relationship: The main page a.html bel...

MySQL GROUP_CONCAT limitation solution

effect: The GROUP_CONCAT function can concatenate...

Detailed explanation of 5 solutions for CSS intermediate adaptive layout

Preface When making a page, we often encounter co...

Web Design: When the Title Cannot Be Displayed Completely

<br />I just saw the newly revamped ChinaUI....

Solution to the problem that input in form cannot be submitted when disabled

I wrote a test program before, in which adding and...