0
1

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 3 years have passed since last update.

CentOS7: Docker-CE & Docker Compose

Last updated at Posted at 2020-06-09

###Docker-CE
Community Edition -> 無償版

###Docker公式サイト
Install Docker Engine on CentOS

###古いバージョンがある場合はアンインストール

#公式より
$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
#これでOK
$ sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engin

###インストール

#リポジトリの設定
$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#インストール
$ sudo yum install -y docker-ce docker-ce-cli containerd.io
#自動起動設定
$ sudo systemctl enable docker
#Docker起動
$ sudo systemctl start docker
#バージョン確認
$ docker --version
#動作中か確認
$ sudo systemctl status docker #-> running表示

###Docker Compose:
WebサーバやDBサーバ等の関連する複数のコンテナを管理するツール

Gitで最新バージョン確認

#ダウンロード -> インストール -> /usr/local/bin/docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/{x.xx.x}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose #-> 実行可能な属性を追加
$ docker-compose --version #-> バージョン確認
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?