Marlock Homes Diary

備忘録。忘れないように書きます。

Docker 1.7 インストール(CentOS 7.1)

こんばんは!!

Docker 1.7をCentOS 7.1にインストールします。

https://docs.docker.com/installation/centos/

# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
# uname -r
3.10.0-123.el7.x86_64


1. OSのアップデート

# yum update

2. Dockerインストールスクリプトの実行

# curl -sSL https://get.docker.com/ | sh
+ sh -c 'sleep 3; yum -y -q install docker-engine'
警告: /var/cache/yum/x86_64/7/docker-main-repo/packages/docker-engine-1.7.1-1.el7.centos.x86_64.rpm: ヘッダー V4 RSA/SHA1 Signature、鍵 ID 2c52609d: NOKEY
docker-engine-1.7.1-1.el7.centos.x86_64.rpm の公開鍵がインストールされていません
Importing GPG key 0x2C52609D:
 Userid     : "Docker Release Tool (releasedocker) <docker@docker.com>"
 Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
 From       : https://yum.dockerproject.org/gpg

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

3. Dockerの起動

# service docker start
Starting docker (via systemctl):                           [  OK  ]
# service docker status
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: active (running) since 木 2015-07-30 20:15:57 JST; 9s ago
     Docs: https://docs.docker.com
 Main PID: 14352 (docker)
   CGroup: /system.slice/docker.service
           mq14352 /usr/bin/docker -d -H fd://

 7月 30 20:16:04 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:05 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:05 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:05 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:05 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:05 localhost.localdomain docker[14352]: time="2015-07-30T20:16...
 7月 30 20:16:06 localhost.localdomain python[14397]: SELinux is preventing ...

                                                       *****  Plugin catchall...
 7月 30 20:16:06 localhost.localdomain python[14397]: SELinux is preventing ...

                                                       *****  Plugin catchall...
 7月 30 20:16:06 localhost.localdomain python[14397]: SELinux is preventing ...

                                                       *****  Plugin catchall...
 7月 30 20:16:07 localhost.localdomain python[14397]: SELinux is preventing ...

                                                       *****  Plugin catchall...
Hint: Some lines were ellipsized, use -l to show in full.

4. Dockerコマンドの確認

# docker -v
Docker version 1.7.1, build 786b29d

捕捉
# : rootで実行
$ : 一般ユーザで実行