在cnetos7上安装docker的步骤
[[email protected] ~]# uname -a
Linux host-192-168-133-37 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[[email protected] ~]yum -y install docker
[[email protected] ~]systemctl restart docker
[[email protected] ~]docker version
docker ce和docker的区别 :https://www.ilanni.com/?p=13426
###docker-ce安装###
1、卸载老版本,较老版本的Docker被称为docker或docker-engine。如果这些已安装,请卸载它们以及关联的依赖关系。
# sudo yum remove docker \
docker-common \
docker-selinux \
docker-engine
2、安装所需的软件包 yum-utils提供了yum-config-manager 效用,并device-mapper-persistent-data和lvm2由需要devicemapper存储驱动程序。
# sudo yum install -y yum-utils device-mapper-persistent-data lvm2
3、添加镜像源
# sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
4、将软件包添加至本地缓存
# sudo yum makecache fast
5、安装docker-ce
# sudo yum install docker-ce
6、启动docker
# sudo systemctl start docker