Install Docker on Debian 12 (Bookworm) or 13 (Trixie) with Docker’s official apt repo. The OneUptime guide walks through the steps. The team that uses the official repo has current Docker; the team that uses Debian’s docker.io package has older versions.
Table of contents
- Remove old versions
- Add Docker’s repo
- Install
- Verify
- Post-install: non-root user
- Debian-specific
- FAQ
Remove old versions
sudo apt remove docker docker-engine docker.io containerd runc
sudo apt autoremove
The team that has old docker packages gets conflicts without removal.
Add Docker’s repo
sudo apt update
sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
On Debian 12 (Bookworm) the codename is bookworm. On 13 (Trixie) it’s trixie.
Install
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Verify
sudo docker run hello-world
The team that sees ‘Hello from Docker!’ has working install.
Post-install: non-root user
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world # no sudo
Debian-specific
- Debian 12 uses cgroup v2 by default.
- Debian’s
docker.iois older - use Docker’s repo. - Docker works on both Bookworm and Trixie.
FAQ
Is Docker on Debian the same as Ubuntu?
Same docker packages, same commands. The difference is the apt repo URL (debian vs ubuntu). The team that uses the right repo for their distro has working installs.
Can I install Docker on Debian 11 (Bullseye)?
Yes - Docker supports the current stable and previous LTS. The team that uses older Debian gets older Docker versions; upgrade to 12 or 13 for current.
Do I need Docker Desktop on Debian?
Docker Desktop is for Mac/Windows. On Linux, you use Docker Engine directly. The team that runs Linux servers has no Desktop needed.
How do I uninstall?
sudo apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin. Then sudo rm -rf /var/lib/docker /var/lib/containerd.
Why is Docker not starting?
sudo systemctl status docker shows status. Common: sudo systemctl start docker. Check /var/log/docker.log for errors.
If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.
Useful related references: