Help us understand the problem. What is going on with this article?

CentOS7.3にDocker Composeまでインストール

More than 3 years have passed since last update.

Docker

古いのを削除

$ sudo yum remove docker \
                  docker-common \
                  container-selinux \
                  docker-selinux \
                  docker-engine

入れ直す

$ sudo yum install -y yum-utils
$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum makecache fast
$ yum list docker-ce.x86_64  --showduplicates |sort -r
# 出てきたものから選ぶ
$ sudo yum install -y docker-ce.x86_64

起動&自動起動設定

$ sudo systemctl enable docker
$ sudo systemctl start docker

Docker Compose

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

バージョン確認

$ docker-compose --version
docker-compose version 1.12.0, build b31ff33

このままだと実行できないので、dockerグループに入れます

# dockerグループがなかった場合
# sudo groupadd docker
$ sudo gpasswd -a $USER docker
$ sudo systemctl restart docker
$ exit
# ログインし直す

参考

微妙に公式ドキュメントどおりにいかなくて焦りました。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away