Docker: Install on Windows10 (Home edition)

During the process of developing my OCR application on AWS, I needed to use container to build my project. However, Docker doesn’t support Windows10 (Home edition) perfectly. Using Docker toolbox can be a solution but I failed. So, I take this note to record the steps and mistakes I made to install Docker Desktop.

Steps

  1. Generate a file hyperv.cmd:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    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
  2. Run hyperv.cmd with administrator privileges and restart may be required.

  3. Turn on Windows features Hyper-V (Control Panel: Turn Windows features on or off)
  4. “Change” the edition of Windows
    Here we don’t really change the edition, we just change the value in registery. Run Command Line with administrator privileges:
    REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F
  5. Download Docker on https://store.docker.com/editions/community/docker-ce-desktop-windows

Mistake

Q. “Error with docker-compose: docker-credential-desktop not installed or not available in PATH”
A. There is an typo in the ~/.docker/config.json:”credSstore” instead of “credsStore”. This is not an issue only happens to me because I found the solution on Github. Obviously, this typo exists not only Windows but also MacOS