Skip to content
Runbook

Install Docker on Arch

Container engine to package, distribute, and run applications in isolation.

Containerscontainercontainerdevopscomposeoci

Installation

Official repository (pacman) · pacman
sudo pacman -S docker docker-compose

docker-compose provides the docker compose v2 subcommand. The docker-buildx package is available separately if needed.

Verify the installation

Verify
docker --version
sudo docker run --rm hello-world

Service

Start
sudo systemctl start docker
Stop
sudo systemctl stop docker
Status
sudo systemctl status docker
Restart
sudo systemctl restart docker
On boot
sudo systemctl enable --now docker

Important files

TypePathDescription
config/etc/docker/daemon.jsonDaemon configuration (registries, log driver, address range). Create it if absent.
data/var/lib/dockerImages, containers, volumes, and filesystem layers.
socket/var/run/docker.sockUnix socket through which the client talks to the daemon.

Command-line tools

  • dockerCommand-line client to manage images and containers.
  • docker composeMulti-container orchestration (docker-compose package).

Uninstall

Uninstall the packages
sudo pacman -Rns docker docker-compose
Remove data and config
sudo rm -rf /var/lib/docker /var/lib/containerd /etc/docker

Destructive: erases all images, containers, and volumes.

Good to know

  • Add your user to the docker group to avoid sudo: sudo usermod -aG docker $USER (then log back in). This is equivalent to root access.
  • The docker service is not enabled after installation: you must explicitly enable it with systemctl enable --now docker.

Installation on Arch Linux

Docker is packaged in the official Extra repository; no third-party source (AUR) is needed. The command sudo pacman -S docker docker-compose installs the engine along with Compose v2, invoked via docker compose. If you need the advanced image builder, add the docker-buildx package.

In keeping with the Arch philosophy, nothing is enabled automatically: after installation, the service is present but stopped and disabled.

Service and permissions

Enable and start the engine in one command: sudo systemctl enable --now docker. Then check its status with sudo systemctl status docker. Without membership in the docker group, every command requires sudo; adding yourself to the group (sudo usermod -aG docker $USER, then log back in) removes this constraint but grants control equivalent to root.

Configuration and data

The optional daemon configuration goes in /etc/docker/daemon.json (create it if it does not exist), followed by sudo systemctl restart docker. Images, containers, and volumes live in /var/lib/docker, which can grow quickly: monitor disk space and periodically run docker system prune to free up room.