用registry搭建私有镜像仓库
更新:HHH   时间:2023-1-7


在192.168.1.244上搭建私有仓库
#docker pull registry
#docker run -d -p 5000:5000 -v /data/myregistry:/var/lib/registry --restart=always --name myregistry registry
#vim /etc/docker/daemon.json

{
        "registry-mirrors": ["https://frz7i079.mirror.aliyuncs.com"],       #有逗号
        "insecure-registries": ["192.168.1.244:5000"]
}

#systemctl restart docker
#docker pull nginx
#docker tag nginx 192.168.1.244:5000/nginx
#docker push 192.168.1.244:5000/nginx

在所有k8s节点上
#vim /etc/docker/daemon.json

{
        "registry-mirrors": ["https://frz7i079.mirror.aliyuncs.com"],       #有逗号
        "insecure-registries": ["192.168.1.244:5000"]
}

#systemctl restart docker
#docker pull 192.168.1.244:5000/nginx

返回云计算教程...