Home >Technology peripherals >It Industry >How to Install Docker on Windows 10 Home
Run Docker on Windows 10 Home Edition: Guide to Bypass Installation Limits
Docker for Windows Installer won't run on Windows 10 Home Edition, but that doesn't mean you can't run Linux containers on Windows. This article will walk you through how to set up a Docker environment on Windows 10 Home Edition without relying on Hyper-V technology.
Key points:
Working principle:
Docker relies on the Linux kernel to run Linux containers. To implement this feature on Windows, you need to set up a Linux virtual machine running as a guest in Windows 10 Home Edition. Docker Machine can simplify this process. The Docker client will use SSH to communicate with Docker Engine, and the container actually runs in a virtual machine, not on a Windows host.
Initial settings:
C: choco install virtualbox
Docker Engine Settings:
C: choco install docker-machine
$ docker-machine create --driver virtualbox default
default
Virtual Machine, click 设置
> 网络
> 适配器1
> 端口转发
and add the required port. default
Virtual Machine, go to 设置
> 共享文件夹
, and add the Windows path you need to mount. Make sure the Permanent option is set. (Solve the invalid setting error: increase the video memory in the display settings) $ docker-machine start vbox
<code class="language-bash">$ docker-machine env default $ eval $(docker-machine env default --shell linux)</code>
To avoid doing this every time you start Git Bash, save the eval
output to the .bashrc
file. Note: The Linux path of DOCKER_CERT_PATH
needs to be converted to Windows path format.
Docker tool settings:
Install Docker Client and Docker Compose using PowerShell with Administrator permissions:
<code class="language-powershell">C:\ choco install docker-cli C:\ choco install docker-compose</code>
Switch back to Git Bash and run the following command to verify that Docker is running normally:
<code class="language-bash">$ docker-machine start default $ docker-machine ls $ eval $(docker-machine env default --shell linux) $ docker info $ docker run hello-world</code>
Successfully running the above command means that Docker has been installed successfully.
Set Docker on WSL2:
In WSL2 Ubuntu terminal:
pip
to install Docker Compose. /etc/wsl.conf
file (create the file if it does not exist): <code>[automount] root = / options = "metadata"</code>
Restart the system to make the settings take effect.
.bashrc
file and execute source ~/.bashrc
. Switch to Linux:
Setting up Docker on Windows 10 Home Edition is more complicated. An easier solution is to switch to a Linux development environment.
Summary:
This article describes how to install and run Docker on Windows 10 Home Edition. If you encounter problems, please check the steps carefully. For a smoother Docker development experience, it is recommended to switch to Linux.
(The FAQs part is the same as the original text, omitted here)
The above is the detailed content of How to Install Docker on Windows 10 Home. For more information, please follow other related articles on the PHP Chinese website!