Linuxpad

Got Linux?

How to Install Docker on Debian 13 (Trixie): A Step-by-Step Guide

How to Install Docker on Debian 13 (Trixie): A Step-by-Step Guide

Debian is one of the most well-known and respected names in the Linux world, which doesn’t need much of an introduction. As a general-purpose distribution, it’s built a rock-solid reputation for stability and reliability, making it a go-to choice for millions of people from regular home users to large enterprises.

First, refresh the packages on your Debian 13 system to ensure you’re using the latest software versions available in the distro’s repository. If there are pending updates, apply them:

sudo apt update

Next is to run the two commands below to update the package index and install the prerequisites necessary to add and use a new HTTPS repository:

sudo apt install apt-transport-https ca-certificates curl gpg

So, let’s now import the Docker GPG repository key. The command below downloads and stores it in a format that the APT package manager can use to verify Docker packages. This security feature ensures that the software you’re installing is authentic:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg

With the GPG key imported, it’s time to add the official Docker repository to our Trixie system so you can install and update Docker directly from upstream’s maintained DEB packages:

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

Then refresh your package list so the package manager knows about the new repository:

sudo apt update

apt-cache policy

Finally, run the following command to install the latest up-to-date Docker release on Debian 13:

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

That’s all. Docker should now be installed; the service should be started and enabled to run automatically on boot by default. To run docker commands as a non-root user, you must first add your user to the “docker” group. It is a simple task. To do that, type in the following:

sudo usermod -aG docker ${USER}

Thanks for your time! I hope you find this guide helpful. As always, your feedback and comments are most welcome.