In Windows you will need to install Docker Desktop with Windows Subsystem for Linux (WSL) activated. There is a good video here. Let’s start the installation:
Run as administrator
and type the following:wsl --install
This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux. Then restart your machine and you can do it again so you can check that it is already installed.
Once the installation ends it will ask for a username and a password. This is not necessary, exit the installation by using Ctrl+C or by closing the window.
Then you need to make Ubuntu the default Linux distribution. List installed Linux distributions typing:
wsl --list -verbose
The one with * is the default configuration. So, if it is not Ubuntu, it can be changed by using the command:
wsl --set-default Ubuntu
Check that everything is correct by opening Docker Desktop
application, going to Configuration
(wheel icon in the right top corner), in General
tab the option WSL 2
should be checked.
Follow Docker’s official documentation to install Docker Desktop in macOS.
Follow Docker’s official documentation to install Docker in Linux.
If you follow the steps and still have problems maybe you need to add your user to docker group:
sudo usermod -aG docker $USER
newgrp docker