37
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2017-04-30

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
# ログインし直す

参考

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

37
51
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
37
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?