Skip to content

Install and configure Docker on Windows

Yang Wu edited this page Sep 24, 2020 · 3 revisions

1. Check out your Windows version

Search winver, and then the dialog will show the Windows version.

  • For Version 1903 or higher, with Build 18362 or higher, you can run Docker with either WSL2 engine (recommended) or legacy Hyper-V backend.
  • For relatively old Windows version, you can use Docker with the legacy Hyper-V backend.

winver

2. Enable Windows features

Turn on the "Hyper-V" and "Windows Subsystem for Linux".

features

(Optional) Install a Windows Subsystem

If you plan to run Docker with the WSL2 engine (which is recommended), install Ubuntu (or other Linux systems) from Windows Store.

windows_store

3. Install Docker

Download the stable version of Docker Desktop for Windows here and install it.

The official installation instruction is here.

4. Configure Docker

If you plan to run Docker with the WSL2 engine, check these options shown in the figure below.

wsl2_enable

If you plan to run Docker with the legacy Hyper-V backend, please DO NOT check those options.

Besides,

5. Run r2g

If you are using the WSL2 engine, open Ubuntu and run commands as follows:

docker run -it -v /your/path:/workspace -u $UID yangwu91/r2g:latest --dry-run

If you are using the legacy Hyper-V backend, open Command Prompt and run commands as follows:

docker run -it -v "C:\your\path":"/workspace" yangwu91/r2g:latest --dry-run

Then allow to share:

allow