Docker学习记录 - 构建私有镜像仓库 - registry

一、安装docker-registry

docker run --name registry -d  -p 5000:5000 --restart=always  -v /opt/data/registry:/var/lib/registry registry

 

二、push镜像

#tag
[root@ecs-aece lib]# docker tag xin-demo-hello:latest 127.0.0.1:5000/xin-demo-hello:latest

#push
[root@ecs-aece lib]# docker push 127.0.0.1:5000/xin-demo-hello:latest

 

 

三、查询镜像库

# http://127.0.0.1:5000/v2/_catalog

curl 127.0.0.1:5000/v2/_catalog

 

 

四、镜像存储路径

 

五、Docker hub

登录docker hub

#https://hub.docker.com/repositories
#
登录docker hub docker login docker.io #登录本地镜像仓库 docker login localhost:5000

 

 

push 镜像

#登录docker hub
docker login docker.io

#commit 建议使用tag
docker commit demo-hello windfly521/demo

#tag
docker tag demo-hello windfly521/demo

#push
docker push windfly521/demo:latest

#备注:
windfly521 - docker hub 用户名
demo - 镜像名

 

 

参考资料:

Docker入门-搭建docker私有仓库

(六)构建Docker私有仓库、Gitlab仓库和持续集成环境

docker 搭建registry

 

如何将自己的Image镜像Push到Docker Hub

 

国内常用开源镜像网站汇总

中国科学技术大学开源软件镜像

 

阿里云官方镜像站

https://developer.aliyun.com/mirror/
https://mirrors.aliyun.com/alpine/edge/main/
https://mirrors.aliyun.com/alpine/edge/community/

 

posted @ 2020-07-23 16:16  风过无痕521  阅读(163)  评论(0编辑  收藏  举报