由于docker官方给出了一种安装方式,这里就不介绍官方的方式了,毕竟对刚接触的萌新也不太友好。
快捷安装方式
# CentOS 6 通过rpm 进行安装
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update -y
yum -y install docker-io
service docker start
chkconfig docker on
# CentOS 7、Debian、Ubuntu 通过脚本一键安装,感兴趣的可以打开链接阅读脚本
curl -sSL https://get.docker.com/ | sh