If you’re running Raspberry Pi OS Trixie and want Docker installed the *right* way here’s the updated method.
————————————————————————
Step 1 — Update Your System
sudo apt update && sudo apt full-upgrade -y
sudo reboot
————————————————————————
Step 2 — Install Required Packages
sudo apt install -y ca-certificates curl gnupg
————————————————————————
Step 3 — Add Docker GPG Key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null
sudo chmod a+r /etc/apt/keyrings/docker.asc
————————————————————————
Step 4 — Add Docker APT Repository (Trixie)
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
————————————————————————
Step 5 — Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
————————————————————————
Step 6 — Enable & Start Docker
sudo systemctl enable docker
sudo systemctl start docker
————————————————————————
Optional: Add Your User to Docker Group
sudo usermod -aG docker $USER
newgrp docker
————————————————————————
Test Docker
docker run hello-world
————————————————————————
You’re All Set!