8

Docker requires win 10 pro because it needs some virtualization extensions (HyperV and Containers). Can these requirements be fulfilled on win 10 Home?

3

5 Answers 5

15

Yes, it can be done on Windows 10 Home (tried on win10Home v1809 27.01.2019)

Run in a command prompt as administrator:

  1. Install Hyper-V:

    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
    pause
    
  2. Install Containers:

    pushd "%~dp0"
    dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
    for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    del containers.txt
    Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
    pause
    
  3. Edit registry keys:

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v EditionID /t REG_SZ /d "Professional"
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v ProductName /t REG_SZ /d "Windows 10 Pro"
    
  4. Download and run official Docker Installer For Windows.

  5. In my case the registry keys were restored after restart, but you could restore them manually:

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v EditionID /t REG_SZ /d "Core"
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName /t REG_SZ /d "Windows 10 Home"
    
3
  • That's impressive perseverance, you get my vote just for getting hyperv on home edition alone. Jan 27, 2019 at 14:16
  • 1
    Worked like a charm for me (Windows 10 Home, build 17134) but only after I put commands for (1) and (2) steps to the *.bat files and run them from Power Shall as administrator.
    – Charnel
    Jul 22, 2019 at 18:11
  • There is now an easier way to do this using chocolatey tool, detailed instructions here -> medium.com/@remisharoon/… Feb 11, 2020 at 6:07
5

There is now a better way to run Docker on Windows 10 Home edition.

The next version of Docker for Windows runs on WSL 2 and MS has made an exception for WSL 2, allowing it to use hyper-V even on Home editions of Windows 10.

My justification for calling this 'better' is that this is the future of Docker on Windows because Docker inc. feels that this is a considerably better solution, as they discuss in their announcements about this new version.

But if you want to take advantage of this solution now (pre-2019H2 Windows update) you will need to install an insiders edition of Windows in order to use the WSL 2 preview and then install the preview of the new Docker.


2020-07 Update

Windows 10, version 2004 is now GA so I thought I would add to this. The above still holds true, but here are some new resources...

https://arstechnica.com/gadgets/2020/06/whats-new-in-windows-10-build-2004/
And scroll down to 'Windows Subsystem for Linux, version 2' for a good short discussion.

And an updated link to the Docker install...
Install Docker Desktop Stable 2.3.0.2 (or later).
https://docs.docker.com/docker-for-windows/wsl/

1
0

This might help someone who cannot upgrade their system to pro or professional. Consider installing Docker Toolbox on Windows. For mac users: Docker Toolbox on Mac. Check out difference Here

Legacy desktop solution. Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of 'Docker Desktop for Mac' and 'Docker Toolbox on Windows'. We recommend updating to the newer applications, if possible.

As per documentation, the toolbox includes these Docker tools:

  • Docker Machine for running docker-machine commands
  • Docker Engine for running the docker commands
  • Docker Compose for running the docker-compose commands
  • Kitematic, the Docker GUI
  • a shell preconfigured for a Docker command-line environment
  • Oracle VirtualBox
0

If you want to use Docker directly within Windows, and you want to run Windows containers, there's still no official support. Docker Desktop won't allow it; it says "Windows Containers support requires a Windows 10 Pro or enterprise build >= 14372".

Windows Containers support requires a Windows 10 Pro or enterprise build >= 14372

However, if you're interested in Linux containers, and you have WSL2 on your Windows 10 Home instance (which you'll have as of version 1903+), you don't need to install Docker Desktop.

(1) Setup a Linux instance via WSL2

Get into an elevated CLI prompt (CMD and PS both work fine):

  1. Confirm you've got WSL2: wsl --status
  2. Install Ubuntu: wsl --install
    • Same as wsl --install --distribution ubuntu
  3. After you're forced to reboot, and you log back in, you'll get a specialized command prompt window that pops up. Setup you Linux user and password. (If you forget, you can do a wsl --user root followed by passwd {your-account-name} to fix it.)
  4. Update: sudo apt update && sudo apt upgrade
  5. Mine didn't have ifconfig: sudo apt install -y net-tools

If you want more info on how to control your instance(s), look at the Microsoft docs.

In general, getting "into" the default, Ubuntu instance within WSL is as easy as typing either "bash" or "ubuntu" from a regular CLI prompt. Though, I'd highly recommend installing "Windows Terminal" and using that instead.

(2) Install Docker

Open up a prompt inside your Linux instance. The general instructions are here, if you need more help. I used a Ubuntu instance.

  1. Trust the docker repo's GPG key: curl -fsSL https://download.docker.com/linux/${ID}/gpg | sudo apt-key add -
    • Same idea as: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  2. Add their stable repo as a package source: echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/${ID} $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
    • Same idea as: 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
  3. Update your local index: sudo apt update
  4. Install docker!: sudo apt install -y docker-ce docker-ce-cli containerd.io
  5. Add your account to the "docker" group: sudo usermod -aG docker $USER
  6. Get that group change to be recognized:
    • Close all of your open sessions and wait ~10 seconds for the Linux instance to get shutdown automatically. Then open up a new session.
    • Close the window and force the instance to restart (from a Windows CLI prompt): wsl --terminate {distro-name} . Then open up a new session.
  7. Start docker: sudo -b dockerd
  8. Prove it's working: docker run --rm hello-world

Dockerd and services/auto-start concerns

WSL2 doesn't presently have a clean way to auto-start the dockerd daemon. There's a lot of workarounds on the 'Net. Some people start it via a Scheduled task that starts dockerd via wsl. Some people start it via a smart chunk of code in either .profile or .bashrc. Soon, there's supposed to be a officially supported approach via the "[boot]" section of the /etc/wsl.conf file, but it still doesn't appear to have landed in Windows 10 20H2 as it was suggested it would.

UPDATE 2021-11-25: I decided on adding this to my .profile (copied from here). It goes around sudo.

if service docker status 2>&1 | grep -q "is not running"; then
    wsl.exe -d "${WSL_DISTRO_NAME}" -u root -e /usr/sbin/service docker start > /dev/null 2>&1
fi

Interactions with the Windows host

  • From a Linux instance into Windows, there's mount points: /mnt/{windows-drive-letter}/...
  • From Windows into a Linux instance, there's a magic "share": \\wsl$\{linux-instance-name}\...

More info on how file permissions work when crossing OS boundaries.

0

Use Winget to install it with one single cmd command

winget install -e --id Docker.DockerDesktop 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.