A Raspberry Pi is the perfect small piece of hardware that allows you to run all different kinds of applications, and the most reliable way to do this is using Docker.
Each service is well-isolated in its own container; does not interfere with anything and can be easily removed if you don’t like it.
Now, let’s see how we can get docker and docker-compose up and running.
- Install docker
curl -sSL https://get.docker.com | sh
- Allow the pi user to run docker commands
sudo usermod -aG docker $(whoami)
Start a new shell (session) or reboot your system
If successfully installed, the above command should print the docker version
Docker Compose installation
- Install dependencies
sudo apt-get install -y libffi-dev libssl-dev python3 python3-pip
- Install Docker Compose
sudo pip3 -v install docker-compose
- Test installation
If successfully installed, the above command should print the docker-compose version
When you try to start a docker container, and it’s giving you the
standard_init_linux.go:207: exec user process caused "exec format error" error, it means the container image is not compatible with the architecture. Raspberry Pi’s use the ARM architecture while the vast majority of docker containers (at this moment) are meant for x64 systems.
Do you use a different or faster method to install docker or docker-compose? Let me know in the comments below ⬇️