环境:CentOS 7
安装docker
# step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# Step 2: 添加软件源信息
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# Step 3: 更新并安装Docker-CE
sudo yum makecache fast
sudo yum -y install docker-ce
# Step 4: 开启Docker服务
sudo service docker start
卸载docker
如何把docker卸载干净?
[root@xinyeshuaiqi ~]# yum list installed | grep docker
docker-client.x86_64 2:1.13.1-94.gitb2f74b2.el7.centos @extras
docker-common.x86_64 2:1.13.1-94.gitb2f74b2.el7.centos @extras
[root@xinyeshuaiqi ~]# sudo yum -y remove docker-client.x86_64
[root@xinyeshuaiqi ~]# sudo yum -y remove docker-common.x86_64
[root@xinyeshuaiqi ~]# rm -rf /etc/systemd/system/docker.service.d
[root@xinyeshuaiqi ~]# rm -rf /var/lib/docker
[root@xinyeshuaiqi ~]# rm -rf /var/run/docker
转载请注明:汪明鑫的个人博客 » docker的安装和卸载
说点什么
您将是第一位评论人!