安装
1、安装Docker
参见:https://docs.docker.com/engine/installation/linux/centos/
2、直接使用root安装(更新系统)
yum update
3.配置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
网友评论