centos docker 安裝 參考網站 https://docs.docker.com/install/linux/docker-ce/centos/linux
一、刪除原有dockerdocker
$ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
二、安裝json
$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
修改docker-ce地址爲阿里地址,加速centos
$ sudo yum-config-manager \ --add-repo \ http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
$ sudo yum install -y docker-ce docker-ce-cli containerd.io
三、修改默認倉庫地址爲163倉庫加速鏡像下載app
mkdir -p /etc/docker echo '{"registry-mirrors": ["http://hub-mirror.c.163.com"] }' > /etc/docker/daemon.json systemctl daemon-reload systemctl start docker docker info
四、docker 卸載網站
systemctl stop docker yum -y remove docker-ce rm -rf /var/lib/docker rm -rf /etc/docker