CentOS7中安装Docker
CentOS7中安装Docker
1.配置docker镜像安装源
tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
4.安装docker
yum install docker-engine
5.启动docker
systemctl enable docker.service
systemctl start docker
卸载
1.查询安装过的包
yum list installed | grep docker
docker-engine.x86_64 17.03.0.ce-1.el7.centos @dockerrepo
2.删除安装的软件包
yum -y remove docker-engine.x86_64
3.删除镜像/容器等
rm -rf /var/lib/docker
参见:https://docs.docker.com/engine/installation/linux/centos/
感谢:http://www.cnblogs.com/xuezhigu/p/6553936.html 同学的知识分享。
CentOS7中安装Docker
https://www.dearcloud.cn/2017/09/07/20200310-cnblogs-old-posts/20170907-Centos7中安装Docker/