Installing Docker Engine on Debian

Reading Time: 2 minutes

Installing Docker Engine on Debian is an article that shows how to install the Docker container application on Linux Debian.

First and foremost, we have written an article explaining installing Debian Linux. You can read this article by accessing the following link:
https://dpcvirtualtips.com/installing-linux-debian-11/

Note: We are using the Debian 11 in this case!

  1. Set up Docker’s apt repository:
apt-get update
apt-get install ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg

Add the repository to apt sources:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  tee /etc/apt/sources.list.d/docker.list > /dev/null

And update the local repository cache:

apt-get update

2. Install the Docker packages:

apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3. Check if the Docker installation was done successfully:

docker run hello-world

The previous command will download and run the Docker container “hello-world”.
When the container runs, it prints a confirmation message and exists. If you see this message, your Docker has been installed successfully and you can use your Docker Host normally!

4. We can run the command “docker info” just to check the details of the docker version installed on our system:

docker info

Look we can see a lot of details, such as client Docker version, server Docker version, and other details of the Docker architecture:

Notes:

  • By default, after installing the Docker Engine, the daemon is configured to start on boot automatically;
  • We can use the command “systemctl status docker” to check the Docker daemon status:
systemctl status docker

Source: https://docs.docker.com/engine/install/debian/

Similar Posts

  • Running VMs on RHEL 8

    Reading Time: 6 minutesRunning VMs on RHEL 8 shows all the necessary steps to configure our Red Hat Enterprise Linux to be a hypervisor, providing the capacity to create and run virtual machines (VMs). We’ve written some interesting articles that may help you before following them: How to install RHEL 8 on Lab – https://dpcvirtualtips.com/how-to-install-rhel-8-on-lab/Configuring Bonding + Bridge…

  • GRUB2 Overview

    Reading Time: 3 minutesGRUB2 (GRand Unified Bootloader version 2) is the default boot loader on most Linux flavors. It resides in the Master Boot Record (BIOS systems) or the UEFI System Partition (UEFI systems) and is responsible for: How does GRUB2 work? Basically, we can pop up some GRUB2 stages: Stage 1: Installed in the MBR or EFI…

  • Gaining Superuser Access on RHEL

    Reading Time: 5 minutesGaining Superuser Access on RHEL shows how to access the system with superuser privileges. We’re using Red Hat Enterprise Linux; however, these examples apply to any Linux distribution. Most operating systems have a superuser (administrator) responsible for administrative and restrictive tasks. In the majority of Linux distributions, the superuser is the “root” account. For tasks…

  • Managing Files from the Command Line

    Reading Time: 5 minutesManaging Files from the Command Line provides an introduction to managing files using the command line on a Linux system. We’re using Red Hat Enterprise Linux (RHEL) 10; however, all instructions are compatible with any Linux distribution. Creating, copying, moving, and removing files and directories are common and essential operations for a Linux system administrator….