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

Summary of some common techniques in front-end development

1. How to display the date on the right in the art...

How to configure wordpress with nginx

Before, I had built WordPress myself, but at that...

JavaScript generates random graphics by clicking

This article shares the specific code of javascri...

How to access MySql through IP address

1. Log in to mysql: mysql -u root -h 127.0.0.1 -p...

5 ways to achieve the diagonal header effect in the table

Everyone must be familiar with table. We often en...

Calling the search engine in the page takes Baidu as an example

Today, it suddenly occurred to me that it would be...

CSS Transition expands and collapses elements by changing the Height

A common development need is that we want to coll...

Introduction to new features of MySQL 8.0.11

MySQL 8.0 for Windows v8.0.11 official free versi...

General Guide to Linux/CentOS Server Security Configuration

Linux is an open system. Many ready-made programs...

Detailed tutorial on deploying apollo with docker

1. Introduction I won’t go into details about apo...

CSS3 property line-clamp controls the use of text lines

Description: Limit the number of lines of text di...

How to shrink the log file in MYSQL SERVER

The transaction log records the operations on the...

Detailed explanation of how to use the Vue date time picker component

This article example shares the specific code of ...

A brief analysis of the four import methods and priorities in CSS

First: 4 ways to introduce CSS There are four way...