Install Docker on Debian
This guide will walk you through how to Install Docker Engine, containerd, and Docker Compose on Debian
If you have an existing version of Docker install, it is best to remove it first.See the Cleaning Up
If you want a full guide, see Docker’s Debian Install Guide
Install
Install curl :
1
2
sudo apt-get update
sudo apt-get install curl
To install the latest stable versions of Docker CLI, Docker Engine, and their dependencies:
1
2
3
4
5
curl -fsSL https://get.docker.com -o install-docker.sh
chmod +x install-docker.sh
./install-docker.sh
Check Installed version
1
docker -v
Check docker compose
1
docker compose
Check runtime
1
sudo docker run hello-world
Use Docker without sudo
1
sudo usermod -aG docker $USER
You’ll need to log out then back in to apply this
Cleaning Up
If you need to uninstall Docker, run the following
1
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
This post is licensed under CC BY 4.0 by the author.