registry服务要求认证
yum install -y httpd-tools
htpasswd -Bbn admin 1C82G5N4zfobWPMTlzdy > /home/ecs-user/registry_auth/htpasswd
启动registry服务
sudo docker run -p 8001:5000 \
--restart=always \
--name registry \
-v /home/ecs-user/my_registry/:/var/lib/registry \
-v /home/ecs-user/registry_auth/:/auth/ \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" \
-d registry
查看registry服务上有哪些镜像
curl -XGET http://47.99.164.28:8001/v2/_catalog
本地镜像打tag
docker commit -m="5i5j-pc项目" -a="zuoerdong" ab5ce696a902 5i5j-pc-php:v1
生成可以推送到私有registry服务的tag
docker tag 5i5j-pc-php:v1 47.99.164.28:8001/5i5j-pc-php:v1
推送到私有服务
docker push 47.99.164.28:8001/5i5j-pc-php:v1
docker registry
a min to read
post