制作镜像
docker build -t ruoyi-auth:v1.0 -f Dockerfile .
docker images|grep xxx
推送镜像
docker login --username=xd11617037511 registry.cn-qingdao.aliyuncs.com
docker tag [ImageId] registry.cn-qingdao.aliyuncs.com/chen_image_xjtu/demo:[镜像版本号]
docker commit -m="commit info" -a="auth" 容器ID 要创建的镜像名:标签
docker push registry.cn-qingdao.aliyuncs.com/chen_image_xjtu/demo:[镜像版本号]
拉取镜像
docker pull registry.cn-qingdao.aliyuncs.com/chen_image_xjtu/demo:[镜像版本号]
私有仓库
curl -XGET http://0.0.0.0:5000/v2/_catalog
docker tag cbjubuntu:0.1 0.0.0.0:5000/cbjubuntu:0.1
docker push 0.0.0.0:5000/cbjubuntu
docker pull 0.0.0.0:5000/cbjubuntu
docker pull registry
vim /etc/docker/daemon.json
{
"registry-mirror": xxxxx,
"insecure-registries": ["0.0.0.0:5000"]
}
systemctl restart docker
docker run -d -p 5000:5000 -v /cbj/myRegistry/:/tmp/registry --privileged=true registry