Install Docker on Windows
Docker Desktop is the way to install Docker on Windows. It runs the Docker daemon inside WSL 2, the Windows Subsystem for Linux.
Check the install
This command shows the client and daemon versions.
docker version --format "Client: {{.Client.Version}} Server: {{.Server.Version}}"Test with hello-world
This command runs the test image. It proves the daemon answers.
docker run hello-worldExample
docker run hello-worldKey points
- Docker Desktop: the app that installs Docker on Windows and macOS.
- WSL 2: the Windows Subsystem for Linux, which runs a real Linux kernel.
- Install Docker Desktop from the Docker website, then start it once.
- Docker Desktop needs WSL 2 turned on, with a Linux distribution installed.
- Use docker version to check the install, and docker run hello-world to test it.
In this example, Docker runs the hello-world test image on Windows. The image prints its greeting and stops. The greeting proves Docker Desktop, WSL 2 and the daemon all work together.
Note
Docker Desktop is free for personal use, education, and small business use.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
What does Docker Desktop need on Windows?