I assume you already have Docker up and running on your Raspberry Pi 2. If not, see this article.
The next natural step is to install Docker Compose (formerly Fig), but there's no ARM support out of the box. This recipe will help you install Docker Compose on your Raspberry Pi 2!
The following six steps will do the trick:
- Get the docker-compose source code from git
- Build docker-compose
- Extract the build from the docker container
- Move the extracted files to their positions
- Install python
- Test your installation
Disclaimer: I've tested this on the Debian Wheezy image described in the referenced article, so your mileage may vary...
First step is to get the Docker Compose source code from GitHub:
git clone https://github.com/docker/fig
Now you should build Docker Compose. The build process takes place inside a Docker container. The result is a Python script.
cd fig
docker build -t rpi-docker-compose .
There is actually a complete build script that produces a binary, but ARM is not supported. That's why we need to do some additional steps on the Raspberry. The next step is to extract the Python code.
mkdir $HOME/dc-files
docker run -it --rm -v $HOME/dc-files:/data --entrypoint /bin/bash rpi-docker-compose
cp /usr/local/bin/docker-compose /data
cp -r /usr/local/lib/python2.7/dist-packages/ /data
exit
sudo cp $HOME/dc-files/docker-compose /usr/local/bin
sudo mkdir /usr/local/lib/python2.7
sudo cp -r $HOME/dc-files/dist-packages /usr/local/lib/python2.7
sudo apt-get install python python-pkg-resources
docker-compose --version
Is there a version for Debian:Jessie?