Skip to content

Instantly share code, notes, and snippets.

@talon
Last active June 11, 2021 10:35
Show Gist options
  • Save talon/4191def376c9fecae78815454bfe661c to your computer and use it in GitHub Desktop.
Save talon/4191def376c9fecae78815454bfe661c to your computer and use it in GitHub Desktop.
Install Docker On Windows 10 Home

Install Docker On Windows 10 Home

"Windows Home Docker Desktop requires Windows 10 Pro or Enterprise version 15063 to run." So says the Docker Installer however, the Docker forums beg to differ

The workaround is to manually image the Hyper-V and Containers features, then trick the installer into thinking you're using Windows Pro.

TL;DR

  1. clone this gist somewhere locally git clone https://gist.github.com/4191def376c9fecae78815454bfe661c.git windows_home_docker
  2. Run windows_home_containers.ps1 in an Administrative Powershell
  3. Restart your computer
  4. Run windows_home_docker.ps1 in an Administrative Powershell

Note: You may need to run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser for Windows to let you execute the scripts

Update

Hi!

We have now released a version of Docker Desktop Edge that allows users of Windows Insider Preview (Win Home 19018 or higher) to use Docker Desktop with WSL 2. If you are trying this out and have issues feel free to drop issues on the for-win Github Repo!

Thanks Ben

https://forums.docker.com/t/installing-docker-on-windows-10-home/11722/70

# Manually provision Windows Home by adding packages from C:\Windows\servicing\Packages to DISM
# (https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism---deployment-image-servicing-and-management-technical-reference-for-windows
function Import-Feature {
param( $Name )
$packages = Get-ChildItem "C:\Windows\servicing\Packages\*$Name*.mum"
foreach ($package in $packages) {
Dism /online /NoRestart /Add-Package:"$package"
}
Dism /online /NoRestart /Enable-Feature /FeatureName:$Name -All /LimitAccess /ALL
}
# Windows Home must be manually imaged with the required Docker Desktop features
Import-Feature -Name Microsoft-Hyper-V
Import-Feature -Name Containers
Write-Output ""
Write-Output "You may now restart your computer and use windows_home_docker.ps1 to install Docker"
# The Docker Desktop Installer assumes that only Windows Pro users have Hyper-V
# in order to skip that check, temporarily update the EditionID registry key to Professional
$windowsNT = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$EditionID = (Get-ItemProperty $windowsNT).EditionID
Set-ItemProperty -Path $windowsNT -Name 'EditionID' -Value 'Professional'
Write-Output ''
Write-Output '==========================================================================================='
Write-Output "EditionID has been temporarily changed from $EditionID to Professional "
Write-Output 'You may now run the Docker Desktop Installer '
Write-Output ' '
Write-Output "When you're done, confirm the following prompt to revert your EditionID back to $EditionID "
Write-Output '==========================================================================================='
Write-Output ''
Set-ItemProperty -Confirm -Path $windowsNT -Name 'EditionID' -value $EditionID
Write-Output ""
Write-Output "All finished! Happy hacking!"
@lhocke
Copy link

lhocke commented Feb 13, 2020

Works great thanks!

I did think the first script was running an infinite loop at first but it was just pulling in a lot of packages

@kevgk
Copy link

kevgk commented Feb 15, 2020

Very nice, thanks!

I had to set ExecutionPolicy to Unrestricted though.

@markhm
Copy link

markhm commented Mar 21, 2020

Many thanks, this worked.

The ExecutionPolicy can be reset to its original value with Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser.

@Inbary-s
Copy link

Worked with no changes. Thank you!

@theeviljameswu
Copy link

Docker installation went fine, but when I try to run docker pull hello-world in powershell with admin privileges, this error message appears:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Any input is appreciated...

@mvaldes14
Copy link

Same issue as above, not exactly sure why. Everything went smootly on installing.
One thing i did notice is that the desktop app indicated it was using WSL2 backend and i do not have WSL2 yet.

Will poke around that see if i can disable it. (Its greyed out)

@ShishkinP
Copy link

ShishkinP commented May 22, 2020

@theeviljameswu

Docker installation went fine, but when I try to run docker pull hello-world in powershell with admin privileges, this error message appears:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Solved it by manually running 'dockerd.exe' located in 'C:\Program Files\Docker\Docker\resources'

@belarba
Copy link

belarba commented Jun 10, 2020

When I restart the computer, all stops working. Any clues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment