LoginSignup
5
4

More than 5 years have passed since last update.

CentOS6.7にDocker Composeインストール 備忘録

Last updated at Posted at 2016-10-28

環境構築中に忘れそうだったのでメモ

docker-composeのOS対応表

docker-composeの1.8系はCentOS 7.0以降だった...orz
なので、1.5.2をインストールすることにした。

docker-compose docker-engine CentOS
1.7.0 1.9.1- 7.0
1.6.2 1.9.1- 7.0
1.5.2 1.7.1- 6.7

インストール

curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

sudoでインストールすると以下のエラー発生

bash: /usr/local/bin/docker-compose: 許可がありません

以下、Install Composeの注意文引用
まさしく、これだ。

Note: If you get a “Permission denied” error, your /usr/local/bin directory probably isn’t writable and you’ll need to install Compose as the superuser. Run sudo -i, then the two commands below, then exit.

supreuserでインストールすることで無事インストール完了

パーミッションの変更

chmod +x /usr/local/bin/docker-compose

Command-line Completionのインストール

curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose

これで、YAMLを書いていこう。

5
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
5
4