yum install epel-release -y yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum-config-manager --enable docker-ce-nightly yum-config-manager --enable docker-ce-test yum-config-manager --disable docker-ce-nightly yum install docker-ce docker-ce-cli containerd.io
#本身註冊一個阿里雲帳號,而後選擇ECS中的鏡像加速服務,就能夠出現一個加速地址,將加速地址配到json文件中
#也就是如下步驟linux
mkdir /etc/docker -p vim /etc/docker/daemon.json { "registry-mirrors": ["https://g80gj7jy.mirror.aliyuncs.com"] } systemctl daemon-reload systemctl restart docker
ps -ef|grep docker docker run hello-world