We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Install Docker

There are a couple of moving parts to keep in mind when it comes to using Docker on your local machine:

  1. The "Docker server" or "Docker Daemon". This listens to requests from the desktop app and executes them. If this isn't running nothing else will work.
  2. The "Docker Desktop" GUI. Starting the GUI should start the server, at least that's how I usually ensure the server is running. The GUI is the visual way to interact with Docker.
  3. The Docker CLI. As a developer, most of your work will be interacting with Docker via the CLI. I'd recommend using the GUI to visualize what's going on with Docker, but executing most of your commands through the command line.

Assignment

Submit the CLI tests. There's no penalty on failure for this lesson.

You may also want to enable shell completion for Docker.

Troubleshooting

If docker version prints the Client section but fails before printing Server, Docker is installed but your terminal can't reach the Docker daemon.

Windows/WSL: Enable Docker Desktop's WSL integration for your distro (Settings > Resources > WSL Integration), click Apply & restart, then restart your terminal. If you run into permission issues, use the Linux instructions below.

Linux: You may need to run Docker with sudo, or follow Docker's Linux post-install steps to run Docker without sudo.