Skip to content

docker 创建私服

bash
docker pull registry

docker run -d -p 5000:5000 -v /home/zly/registry:/tmp/registry --privileged=true registry

docker commit -m="ifconfig add" -a="zly" 4eda2f05db53 zlyunbuntu:1.2
# 查看私服
curl -XGET  http://localhost:5000/v2/_catalog
docker tag zlyunbuntu:1.2 192.168.1.238:5000/zlyubuntu:1.2

# 配置 /etc/docker/daemon.json
    "insecure-registries": ["192.168.1.238:5000"]
    
docker push 192.168.1.238:5000/zlyubuntu:1.2