This guide describes how to install the Docker Engine on Debian 12 (Bookworm) and configure it so that it starts automatically as a system service and remains updatable via APT.

System update

Before installation, a complete update of all existing packages is recommended to avoid version conflicts.

Required tools

  • ca-certificates provides the certificates of trusted issuers.

  • curl is used to download the Docker GPG key.

  • gnupg converts the key into a format readable by APT.

Creating the keyring directory

APT stores repository keys since Debian 12 in the directory /etc/apt/keyrings
The directory is created with the correct permissions:

The permissions 0755 allow read access for everyone, write access remains restricted to root.

Adding the official Docker GPG key

  • The key is downloaded over a secure HTTPS connection.

  • gpg –dearmor converts it into the binary format that APT understands.

  • chmod a+r ensures that APT can read the key.

Adding the Docker repository

  • This entry adds the stable Docker repository.

  • arch specifies the architecture (e.g., amd64),

  • signed-by binds the key specifically to this repository.

Update package lists again

In the output, a line should appear such as:

Install Docker

PackageDescription
docker-cemain service (dockerd)
docker-ce-clicommand-line tool
containerd.iocontainer runtime
docker-buildx-pluginadvanced build feature (BuildKit)
docker-compose-pluginmulti-container management

Enable and start the service

Functionality test