Docker Desktop for Windows requires WSL 2. Start by installing WSL if it's not already installed on your system.
-
Open the terminal as an administrator and run the following command to install WSL and set WSL 2 as your default version:
wsl --install
This command will enable the necessary features, download the latest WSL Linux kernel, set WSL 2 as your default version, and install a Linux distribution for you (by default, Ubuntu).
-
Restart your computer if prompted.
-
Download Docker Desktop for Windows from the official Docker website.
-
Run the installer and follow the prompts. Make sure to:
- Agree to the terms and conditions.
- Choose to enable the WSL 2 feature.
-
Once the installation is complete, Docker Desktop will start automatically. If it doesn't, you can start it from the Start menu.
-
Docker Desktop will prompt you to log in with a Docker account. If you don't have one, you can create a free account.
-
Docker Desktop will configure itself to use WSL 2. If there are any issues, you can go to Docker Desktop settings and ensure that WSL 2 is selected under the "General" tab.
-
Open a new terminal window and run the following command to verify that Docker is installed correctly:
docker --version
This command should return the Docker version installed on your system.
See the section on Docker Tutorial for basic usage examples and a step-by-step guide on running containers and creating a Dockerfile.
See Docker documentation for more detailed information on using Docker.