安裝
1、安裝Docker
參見:https://docs.docker.com/engine/installation/linux/centos/
2驴党、直接使用root安裝(更新系統(tǒng))
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