LoginSignup
4
4

More than 5 years have passed since last update.

Raspberry Piでdocker-composeをインストールする

Last updated at Posted at 2017-05-23

https://github.com/docker/compose からソースコードをクローンし、出来上がったディレクトリに入る。

$ git clone -b release https://github.com/docker/compose.git
$ cd compose

こちらの Makefile を作成し make を実行する。かなり時間がかかる。

IMG=docker-compose:armhf
IMG_DEBIAN=armhf/debian:wheezy
BIN=./dist/docker-compose-Linux-armv7l
.PHONY: all clean install

$(BIN):
        docker build -t $(IMG) -f Dockerfile.armhf .
        docker run --rm --entrypoint="script/build/linux-entrypoint" -v $(PWD)/dist:/code/dist -v $(PWD)/.git:/code/.git "$(IMG)"

all: $(BIN)


install:
        install $(BIN) /usr/local/bin/docker-compose

clean:
        -rm -f $(BIN)
        -docker rmi $(IMG)
        -docker rmi $(IMG_DEBIAN)

ビルドが終わったらインストールする。

$ sudo make install

出来上がったイメージが不要なら削除する。

$ make clean
4
4
0

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
  3. You can use dark theme
What you can do with signing up
4
4