Install Docker and Docker Compose in Debian 12 Rumi, February 5, 2026 Prerequisites Update your system’s package list and install the necessary packages for a secure connection to the Docker repository: sudo apt update sudo apt install ca-certificates curl gnupg 1. Set Up the Docker Repository To set up the Docker repository, you need to add Docker’s official GPG key and the repository to your system’s APT sources. Create the directory for Docker’s GPG key: sudo install -m 0755 -d /etc/apt/keyrings Add Docker’s official GPG key and set up the stable repository: sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null Update the package index: sudo apt update 2. Install Docker and Docker Compose Install Docker Engine, CLI, containerd, and the Docker Compose plugin using the following command: sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin The Docker service starts automatically after installation. 3. Verify the Installation Check that the Docker service is running:bash sudo systemctl status docker Verify the installation by running a test container:bash sudo docker run hello-world Confirm the Docker Compose version (note that the command for v2 does not include a hyphen): docker compose version 4. Manage Docker as a Non-Root User (Optional, Recommended) By default, root privileges are needed to run Docker commands. To use Docker without sudo, add your user to the docker group: sudo usermod -aG docker $USE Administrations Configurations (Linux) DebianDebian 12Docker