Install Docker in CentOS 6

更新 yum 並加入 EPEL 套件庫

yum update -y
wget http://mirror01.idc.hinet.net/EPEL/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

安裝 docker

yum install docker-io -y

會遇到以下問題

[root@ip-10-0-3-202 prod-user]# docker ps
Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

解決方法

yum install yum-conf-sl6x
yum-config-manager –enable public_ol6_latest
yum install device-mapper-event-libs -y