We recommend Ubuntu 20 LTS.

All the tutorials here have been validated on Ubuntu 20.04 LTS and WSL2 on Windows; they should also be available on other modern stable ubuntu releases, e.g., Ubuntu 18 LTS, Ubuntu 16 LTS. Other Linux/Unix releases might also work; please check Docker Engine for Linux. Besides, the system inside the tutorial docker containers here is Ubuntu.

All the commands we demonstrate here are based on Ubuntu, if you use Windows or Mac, please adjust them according to your OS.


Windows

Please check the system requirements for Docker Desktop for Windows.

WSL2 backend (recommended)

If you use WSL2 backend Docker, you can enable the access from your WSL2 to Docker in Docker dashboard. : )

Hyper-V backend and Windows containers

❗Caution❗

If you are worrying about the space of your C:\\ drive, the methods below might be helpful. (Please be aware of the backend you used)

WSL2 backend

Use mklink in Windows cmd console to create a junction link before installing. For example(the four target directories can be adjusted as you like):

mklink /j "C:\\ProgramData\\Docker" "D:\\ProgramData\\Docker"
mklink /j "C:\\ProgramData\\DockerDesktop" "D:\\ProgramData\\DockerDesktop"
mklink /j "C:\\Program Files\\Docker" "D:\\Program Files\\Docker"
mklink /j "C:\\Users\\YourUserName\\AppData\\Local\\Docker" "D:\\Users\\YourUserName\\AppData\\Local\\Docker"

The link sources on C:\\ will be created by mklink. Please make sure they are not already there. Conversely, mklink does not create the target folders, so you need to make sure they exist. After you create the soft link, your installation of Docker will happen in the D:\\.

If you have installed Docker, you might need to uninstall and re-install it to move it or use the way below to only move the images(this should be enough to save your space)

WSL2 backend docker is managed by wsl service. So you can move the Docker image as wsl. After installing Docker, use the cmd below to move it to another drive:

(if you have used Docker, remeber to stop it at first)

wsl -l -v
wsl --shutdown
wsl --export docker-desktop-data <your-target-directory1>
wsl --export docker-desktop <your-target-directory2>

wsl --unregister docker-desktop-data
wsl --unregister docker-desktop

wsl --import docker-desktop-data <new-install-directory1> <your-target-directory1> --version 2 
wsl --import docker-desktop <new-install-directory2> <your-target-directory2> --version 2

See Managing Windows Subsystem-for-Linux or wsl --help for more details.

Hyper-V backend

Use mklink in Windows cmd console to create a junction link before installing. For example(the four target directories can be adjusted as you like):

mklink /j "C:\\ProgramData\\Docker" "D:\\ProgramData\\Docker"
mklink /j "C:\\ProgramData\\DockerDesktop" "D:\\ProgramData\\DockerDesktop"
mklink /j "C:\\Program Files\\Docker" "D:\\Program Files\\Docker"
mklink /j "C:\\Users\\YourUserName\\AppData\\Local\\Docker" "D:\\Users\\YourUserName\\AppData\\Local\\Docker"

The link sources on C:\\ will be created by mklink. Please make sure they are not already there. Conversely, mklink does not create the target folders, so you need to make sure they exist. After you create the soft link, your installation of Docker will happen in the D:\\.

If you have installed Docker, you might need to uninstall and re-install it to move it.


Mac OS

Please check the system requirements for Docker Desktop for Mac.