Install Docker on Raspberry Pi

This is a script that I wrote a couple of months ago for my Raspberry Pi.

It installs:

# Run with super user priviledges

# Update packages
echo "Update packages"
apt-get update

# Remove old docker
echo "Remove old docker"
apt-get -y remove docker docker-engine containerd runc
rm -rf /var/lib/docker

# Install dependencies
echo "Install dependencies"
apt-get -y install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \

# Download docker scripts
echo "Download docker scripts"
curl -fsSL -o

# Give executable right
echo "Give executable right"
chmod +x

# Run Docker installer
echo "Run Docker installer"

# Add the pi user to be able to run docker
echo "Add the pi user to be able to run docker"
usermod -aG docker pi

# Start docker daemon at boot
echo "Start docker daemon at boot"
systemctl enable docker

# Clean up
echo "Clean up"
rm -rf

# Docker compose
apt-get install -y python-pip
pip install docker-compose

# Reboot
echo "Please, reboot. (sudo reboot)"

Hope that helps!