15
22

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.

CentOS6にdockerを構築する手順

Last updated at Posted at 2018-01-08

CentOS6にDockerとDocker Composeをインストールする手順について。

事前準備

CentOSの最新化

yum update

インストール

dockerのインストール

yum install epel-release

sudo tee /etc/yum.repos.d/docker.repo <<- 'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

yum install docker-engine

dockerサービスの起動

service docker start

Docker Composeのインストール

CentOS6の場合、Docker Compose 1.5.2以下のバージョンしかサポートしていないため、1.5.2をインストールする。

sh -c "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

注意点

Docker Compose 1.5.2の場合、docker-compose.ymlはバージョン1のファイル形式で記述する必要がある。

15
22
1

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
15
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?