Setting up Docker
Every other guide in this Library assumes this is already done; this is that first step, on its own.
- 1
Install Docker Engine
On Linux, the official install script handles most distributions in one line. On macOS or Windows, Docker Desktop from docker.com is the easiest path instead.
curl -fsSL https://get.docker.com | sh - 2
Run it without sudo
Adding the current user to the docker group means Docker commands work without typing sudo every time; this takes effect after logging out and back in.
sudo usermod -aG docker $USER - 3
Verify it works
This pulls a tiny test image and prints a confirmation message if everything's set up correctly.
docker run hello-world - 4
Confirm Compose is available
Modern Docker installs bundle Compose as a plugin already, worth double-checking since every other guide in this Library uses it.
docker compose version
Further reading
- Docker Engine install docs
Official per-operating-system instructions, useful if the one-line script doesn't fit a particular machine.
- Docker Compose documentation
Reference for the compose file format used throughout this Library.