search
LoginSignup
24

More than 3 years have passed since last update.

Organization

Raspberry Pi 3にdocker-composeを入れる

https://qiita.com/hisurga/items/fc26f8823c92fc727307
https://www.berthon.eu/2017/getting-docker-compose-on-raspberry-pi-arm-the-easy-way/
上の記事の丸パクリだが、master に既に存在するDockerfile.armhf を利用するという所に微小な新規性を感じたので記事にする

git clone https://github.com/docker/compose.git
cd compose
sudo docker build -t docker-compose:armhf -f Dockerfile.armhf .
sudo docker run --rm --entrypoint="script/build/linux-entrypoint" -v $(pwd)/dist:/code/dist -v $(pwd)/.git:/code/.git "docker-compose:armhf"
# ちなみにfish
sudo docker run --rm --entrypoint="script/build/linux-entrypoint" -v (pwd)/dist:/code/dist -v (pwd)/.git:/code/.git "docker-compose:armhf"

dist の下にdocker-compose が作成されるのでコピー

sudo cp dist/docker-compose-Linux-armv7l /usr/local/bin/docker-compose
docker-compose --version
docker-compose version 1.20.0dev, build 4ceeaad

わーい動いた

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
24