You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10家庭版能否在WSL中运行Docker Engine?

Running Docker Engine in WSL Ubuntu (Windows 10 Home)

Absolutely! Running Docker Engine in your WSL Ubuntu environment is not only possible—it’s actually one of the most reliable workarounds for Windows 10 Home users who can’t install Docker Engine directly (without relying on Docker Toolbox). Here’s a step-by-step guide to get it up and running smoothly:

1. Confirm & Upgrade to WSL 2

Docker Engine works best with WSL 2 (WSL 1 has inherent limitations around containerization). First, check your current WSL version:

wsl -l -v

If your Ubuntu instance is running on WSL 1, upgrade it with this command:

wsl --set-version Ubuntu 2

To make WSL 2 the default for any future Linux distros you install, run:

wsl --set-default-version 2

2. Install Docker Engine in WSL Ubuntu

You’ll install the official Docker Engine package just like you would on native Ubuntu:

  • First, uninstall any outdated Docker-related packages (if they exist):
    sudo apt-get remove docker docker-engine docker.io containerd runc
    
  • Set up Docker’s official APT repository:
    1. Update your system’s package index:
      sudo apt-get update
      
    2. Install required packages to let APT use HTTPS repositories:
      sudo apt-get install ca-certificates curl gnupg lsb-release
      
    3. Add Docker’s GPG key to verify package authenticity:
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
      
    4. Add the stable Docker repository to your system’s sources:
      echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
      
  • Install Docker Engine, containerd, and Docker Compose:
    sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
    
  • Verify the installation was successful by running a test container:
    sudo docker run hello-world
    

If you see a friendly welcome message, Docker is up and running!

To avoid typing sudo every time you use Docker commands:

  • Create a docker system group:
    sudo groupadd docker
    
  • Add your current user to the docker group:
    sudo usermod -aG docker $USER
    
  • Log out of your WSL session and log back in (or restart WSL), then test the setup without sudo:
    docker run hello-world
    

Quick Tip

You don’t need Docker Desktop for this setup—WSL Ubuntu will run a fully native Docker Engine instance. WSL 2 also offers better file sharing performance with Windows and more reliable networking than WSL 1, making it perfect for Docker workflows.

内容的提问来源于stack exchange,提问作者urig

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:49:02