vi /etc/docker/daemon.json

{
    "registry-mirrors": [
        "http://hub-mirror.c.163.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://registry.docker-cn.com",
        "https://mirror.ccs.tencentyun.com"
    ],
    "insecure-registries":["192.168.140.21:8082"]

}

registry-mirrors : 配置镜像源地址
insecure-registries :配置私有库,例如 Harbor

重启配置
重启docker

systemctl daemon-reload
systemctl restart docker.service
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐