Install Docker on Debian 12 (Bookworm)
How to Install Docker on Debian
Docker is a popular platform for developing, shipping, and running applications inside containers. This guide will show you how to install Docker on a Debian-based system.
Step 1: Update the Package Index and Install Necessary Packages
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
Step 2: Add Docker’s Official GPG Key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Step 3: Set Up the Docker Repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Step 4: Update the Package Index Again
sudo apt-get update
Step 5: Install Docker Engine, containerd, and Docker Compose
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Step 6: Verify the Docker Installation
sudo docker run hello-world
If the installation is successful, you should see a message saying "Hello from Docker!" indicating that Docker is installed and running correctly.
Congratulations! You now have Docker installed on your Debian system. Happy containerizing!
Comments
Post a Comment