Back to blog
Jul 01, 2024
2 min read

How to install Docker on Debian

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

What is Docker?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow developers to package an application with all of its dependencies, including libraries and other configuration files, into a standardized unit for software development.

Benefits of Using Docker

  • Consistency: Ensures that applications run the same way across different environments.
  • Portability: Containers can run on any system that supports Docker, regardless of the underlying infrastructure.
  • Efficiency: Containers are lightweight and use fewer resources compared to traditional virtual machines.
  • Rapid deployment: Containers can be quickly created, started, and stopped.
  • Isolation: Applications and their dependencies are packaged together, reducing conflicts between different projects.

Let’s start to install Docker

  1. open Debian linux then open terminal client, change user to root account, then run apt install open-vm-tools command line. img01

  2. Update Debian linux system.

apt update
apt dist-upgrade -y

img02

  1. install prerequisites
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

img03

  1. add docker’s GPG key and add docker Repository
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update

img04

  1. Install Docker Engine
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin

img05

  1. Verify Installation
sudo systemctl status docker

img06

docker pull hello-world
docker run hello-world

img07