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 \

Step 2: Add Docker’s Official GPG Key

sudo mkdir -p /etc/apt/keyrings
curl -fsSL | 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] \
  $(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
Add docker repo to linux

Step 5: Install Docker Engine, containerd, and Docker Compose

sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

Step 6: Verify the Docker Installation

sudo docker run hello-world

Hello world in Docker

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!


Popular posts from this blog

Unsupervised Learning

Automate Blog Post creation using Blogger APIs and Python

Setting up Python Flask server on internet via Port forwarding

Setting up Jupyter Lab integrated with Python, Julia, R on Windows Subsystem for Linux (Ubuntu)

The beginning of Data Quest