Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Docker on windows 10 Home, can it be done?

Tags:

docker

windows

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

like image 367
Krzysztof Cichocki Avatar asked Jan 27 '19 10:01

Krzysztof Cichocki


2 Answers

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"
    
like image 113
Krzysztof Cichocki Avatar answered Sep 30 '22 14:09

Krzysztof Cichocki


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/

like image 25
Tom Avatar answered Sep 30 '22 14:09

Tom