1、docker1.7安装
下载安装包
链接:https://pan.baidu.com/s/1NSMX9hIIPLOGiEmpZC7hTA
提取码:ls4p
链接:https://pan.baidu.com/s/1_5o6meEpbBYB3alPUidQmg
提取码:tk34
先卸载自带的docker,
yum remove -y docker-ce docker-ce-selinux container-selinux
安装 Docker
yum install -y docker-ce-*.rpm
配置daemon.json(必须)
cat >/etc/docker/daemon.json<<EOF
{ "registry-mirrors": ["https://wb2g6zxl.mirror.aliyuncs.com"]}
EOF
参照:https://www.cnblogs.com/effortsing/p/10060610.html
启动docker
systemctl enable docker
systemctl start docker
查看 docker 版本
docker version
卸载docker
[root@bogon ~]# yum list installed | grep docker
docker-ce.x86_64 17.03.2.ce-1.el7.centos installed
docker-ce-selinux.noarch 17.03.2.ce-1.el7.centos installed
yum -y remove docker-ce.x86_64
yum -y remove docker-ce-selinux.noarch
删除镜像/容器等
rm -rf /var/lib/docker
2、docker1.8安装
下载安装包
链接:https://pan.baidu.com/s/1d5RO09wL-XwL0-pTKvPbIA
提取码:cbur
先卸载自带的docker,
yum remove -y docker-ce docker-ce-selinux container-selinux
安装 Docker
yum install -y docker-ce-*.rpm
配置daemon.json(必须)
cat >/etc/docker/daemon.json<<EOF
{ "registry-mirrors": ["https://wb2g6zxl.mirror.aliyuncs.com"]}
EOF
参照:https://www.cnblogs.com/effortsing/p/10060610.html
启动docker
systemctl enable docker
systemctl start docker
查看 docker 版本
docker version
卸载docker
yum list installed | grep docker
yum -y remove docker-ce.x86_64
yum -y remove docker-ce-selinux.noarch
删除镜像/容器等
rm -rf /var/lib/docker