p0bcag
Last Updated: February 25, 2016
·
3.169K
· jeffli

Install Docker in CentOS 6.4

Almost all the tips come from liguidweb.

  • Add epel repo and update
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update 

If yum complains that

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Then try to run following command to fix it:

yum upgrade ca-certificates --disablerepo=epel
  • Install and configure docker
yum  install docker-io
service docker start
chkconfig docker on
  • Pull an image
docker pull centos

If you want to use other registry mirror, please add following line to the /etc/sysconfig/docker

other_args="--registry-mirror=$REGISTRY"

Note that the argument is called other_args. The OPTIONS which is applicable in CentOS 7 does not work in CentOS 6.4. I use Tabao Docker accelerator so my argument looks like --registry-mirror=http://foobar.mirror.aliyun.com