Install Docker on Raspberry Pi
date
Jun 29, 2023
thumbnail
slug
install-docker-on-raspberry-pi
author
Can Durmus
status
Published
tags
Docker
Installation
Raspberry Pi
summary
Install Docker and Docker Compose on your Raspberry Pi in 5 easy steps
type
Post
updatedAt
Jul 1, 2023 06:12 PM
1. First things first, set up your Raspberry Pi
You can follow this guide to set up your Raspberry Pi to install anything on it.
2. Let’s get started, get the installer script
By running the following command you will be downloading an installer script to your home directory.
curl -fsSL https://get.docker.com -o get-docker.sh
You can run the script with the following command.
sudo sh get-docker.sh


3. Add the ‘pi’ user to the ‘docker’ group
This will allow us to run the
docker
command without sudo
sudo usermod -aG docker pi
You should restart the Raspberry Pi by using
sudo reboot
command after this step.
4. Test your Docker installation
You can run an example Docker container with the following command. It will download (pull) and run the container.
docker run hello-world

5. Install Docker Compose on Raspberry Pi
To install Docker Compose on Raspberry Pi, you can use apt repositories as follows.
sudo apt install docker-compose

Have fun!