You can follow this guide to set up your Raspberry Pi to install anything on it.
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
This will allow us to run
docker command without
sudo usermod -aG docker pi
You should restart the Raspberry Pi with
sudo reboot after this step.
You can run an example Docker container with the following command. It will download (pull) and run the container.
docker run hello-world
In order to install Docker Compose on Raspberry Pi, you can use apt repositories as follows.
sudo apt install docker-compose