Following are the steps to install Docker on Raspberry Pi:
1. Update your Raspberry Pi: Make sure that your Raspberry Pi software is up to date with the following commands:
```
sudo apt-get update
sudo apt-get upgrade
```
1. Download and Install Docker: With your Raspberry Pi updated, you can now install Docker. The easiest way is to use their convenience script:
```
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
```
1. Add Permission to Pi User to Run Docker Commands: By default, running Docker commands requires administrator privileges, but you can add the Pi user to the “docker” group in order to run Docker commands without needing to use sudo:
```
sudo usermod -aG docker pi
```
You will need to log out and log back in or reboot your Raspberry to apply this change.
1. Test your Docker installation: You can test your Docker installation by running a “hello-world” container:
```
docker run hello-world
```
You should see a message saying that your installation appears to be working correctly.
1. Docker Compose:
Docker Compose is a tool that allows you to define and manage multi-container Docker applications. It uses YAML files to configure the application’s services and performs the creation and start-up process of all the containers with a single command. To install Docker Compose on your Raspberry Pi, you can use the pip command:
```
sudo pip install docker-compose
```
After the above steps, Docker is ready to use on Raspberry Pi.