镜像加速使用说明

由于国内纷纷关闭Docker镜像仓库,导致在国内无法下载Docker镜像
为了加速 Docker 镜像拉取,可以使用以下命令设置

sudo tee /etc/docker/daemon.json <<EOF
{
    "registry-mirrors": ["https://docker.pengcheng.center"]
}
EOF
# 重载 Docker 配置
sudo systemctl  daemon-reload
# 重启 Docker 服务
sudo systemctl restart docker

从镜像仓库拉取镜像,请参考以下命令:


# 拉取 Docker-Hub上的Nginx最新镜像
# docker pull nginx:latest
latest: Pulling from library/nginx
f11c1adaa26e: Pull complete
c6b156574604: Pull complete
ea5d7144c337: Pull complete
1bbcb9df2c93: Pull complete
537a6cfe3404: Pull complete
767bff2cc03e: Pull complete
adc73cb74f25: Pull complete
Digest: sha256:67682bda769fae1ccf5183192b8daf37b64cae99c6c3302650f6f8bf5f0f95df
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest