Note
This guide provides a copy-paste-observe list of quick instructional steps to install Docker instantly on a RaspberryPi, assuming it has a Linux-based operating system on it.
Note
Verified on RaspberryPi 4B.
Run this command to download Docker’s GPG key and convert it into a format trusted by APT for secure package verification:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpgRun this command to add the Docker APT repository for Debian (Bookworm) so your system can install Docker packages from the official source:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullRun these commands to update your package index and install Docker Engine along with CLI tools, Buildx, and Compose plugins:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -yRun these commands to create the Docker user group and add your current user so Docker can be used without sudo:
sudo groupadd docker
sudo gpasswd -a $USER dockerRun this command to reboot your system so that group membership and Docker installation changes take full effect:
sudo rebootRun docker ps below and you should see something similar below in your terminal:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES