posts - 359,comments - 0,views - 19万

1、拉取镜像

1
docker pull registry:2

2、运行

1
docker run -d -v /usr/local/registry:/var/lib/registry -p 5000:5000 --restart always --name registry registry:2

3、访问

1
http://192.168.228.147:5000/v2/_catalog

4、推送测试

第一步打标签

[root@bogon ~]# docker tag nginx 192.168.228.147:5000/test:v1
[root@bogon ~]# docker images
REPOSITORY                  TAG       IMAGE ID       CREATED         SIZE
nginx                       latest    605c77e624dd   9 months ago    141MB
192.168.228.147:5000/test   v1        605c77e624dd   9 months ago    141MB
registry                    2         b8604a3fe854   11 months ago   26.2MB

 如果仓库服务器使用的是http,需要配置https访问,linux环境下在/etc/docker/daemon.json添加以下配置

{
"registry-mirrors": ["https://cr.console.aliyun.com/"],
"insecure-registries":["IP:5000"]
}
systemctl daemon-reload && systemctl restart docker &&
docker restart registry

推送

1
docker push 192.168.228.147:5000/test:v1

 

 测试:    #也需要配置/etc/docker/daemon.json

复制代码
[root@bogon ~]# docker pull 192.168.228.147:5000/test01
Using default tag: latest
latest: Pulling from test01
a2abf6c4d29d: Pull complete
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Pull complete
a0bcbecc962e: Pull complete
Digest: sha256:ee89b00528ff4f02f2405e4ee221743ebc3f8e8dd0bfd5c4c20a2fa2aaa7ede3
Status: Downloaded newer image for 192.168.228.147:5000/test01:latest
192.168.228.147:5000/test01:latest
[root@bogon ~]# docker images
REPOSITORY                    TAG       IMAGE ID       CREATED         SIZE
192.168.228.147:5000/test01   latest    605c77e624dd   9 months ago    141MB
复制代码

 docker-registry-browser的轻量级解决方案

基于docker-registry更加轻量级并自带可视化界面

 

  

 

 

  

posted on   属于我的梦,明明还在  阅读(45)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示