Update on 2021-05-21:
Although the method presented in this post still works as described for the version mentioned (1.25.5), for newer versions (e.g.: 1.29.2) changes in the cloned repo code are required.
Because of that it is recommended to install
docker-composeon a Raspberry Pi using the pip alternative method.
Original post from 2020-06-05:
Besides specialized distros like dietpi - where the installation is one command-line away - or hypriot -, which comes with it preinstallled and optimized, the official documentation already includes instructions for using an official
arm supported repository.
If you consider:
You’ll see it returns an error. Maybe not, since the command fails without any visible error:
The download was only 9kb, it was not the expected binary, but the
404 Not Found error returned when accessing https://github.com/docker/compose/releases/download/1.25.5/docker-compose-Linux-armv7l. There are no release builds for
It’s possible to install
docker-compose using pip, but what if a pre-compiled binary is desired?
It’s actually pretty simple to compile the
docker-compose binary. The only requirement is a Raspberry Pi with a working
To build and install the 1.25.5 release:
# clone the repo $ git clone https://github.com/docker/compose.git $ cd compose # checkout the desired version $ git checkout 1.25.5 # run the build script $ ./script/build/linux # wait a little while... and install it $ sudo mv dist/docker-compose-Linux-armv7l /usr/local/bin/docker-compose
The build script detects the host architecture and compile the binary using the correct docker images,
armhf on the Raspberry Pi 3 Model B+.
That’s it! plain and simple! and don’t forget to save it aside so it’s easy to reuse it on other boards… because who only has one rPi? I know I don’t…