docker私有库管理
来源:互联网 发布:惠普企业软件 编辑:程序博客网 时间:2024/04/29 14:09
私有库查询命令:
curl --basic --user user:password https://registry.evehicle.cn/v2/_catalog
可以查询到私有库中的镜像,但查不到每个镜像的版本。可以通过下面脚本进行全查询:
#!/usr/bin/env python# -*- coding utf-8 -*-import requestsimport jsonimport tracebackrepo_ip = '10.172.94.55'repo_port = 5000def getImagesNames(repo_ip,repo_port): docker_images = [] try: url = "http://" + repo_ip + ":" +str(repo_port) + "/v2/_catalog" res =requests.get(url).content.strip() res_dic = json.loads(res) images_type = res_dic['repositories'] for i in images_type: url2 = "http://" + repo_ip + ":" +str(repo_port) +"/v2/" + str(i) + "/tags/list" res2 =requests.get(url2).content.strip() res_dic2 = json.loads(res2) name = res_dic2['name'] tags = res_dic2['tags'] for tag in tags: docker_name = str(repo_ip) + ":" + str(repo_port) + "/" + name + ":" + tag docker_images.append(docker_name) print docker_name except: traceback.print_exc() return docker_imagesa=getImagesNames(repo_ip, repo_port)#print a
阅读全文
0 0
- docker私有库管理
- Docker私有仓库管理
- Docker私有仓库管理
- docker 私有库registry+镜像管理平台humpback
- Docker搭建私有库
- Docker 建私有库
- Docker私有仓库管理之Harbor搭建
- 建立docker私有库(docker registry)
- Centos7搭建Docker私有库
- docker私有仓库搭建 使用Portus管理docker registry 私有仓库
- cocoapods管理私有库
- 企业级Docker私有仓库Harbor管理平台构建示例
- Docker容器管理平台Humpback进阶-私有仓库
- CentOS7.3的docker私有仓库安装和管理
- docker安装以及私有库搭建
- Docker Registry--私有docker站
- docker 搭建私有registry
- 创建docker私有仓库
- POJ 3253
- HttpURLConnection请求json数据加载到ListView上
- poj1386 Paly onWords
- ObjC如何通过runtime修改Ivar的内存管理方式(三)
- WiFiAp探究实录--功能实现与源码分析
- docker私有库管理
- Python3教程Web开发实战梳理-day6(配置文件)
- MySql中UTF-8编码的数据在CMD窗口显示乱码的解决方法
- git使用
- 师父终于给派了个任务。echarts相关
- 不通过 您的代码已保存 编译错误:您提交的代码无法完成编译 ./TreeLevel.java:37: error: cannot find symbol node.next=new ListNode(
- Prime Ring Problem (dfs)深度搜素
- BZOJ 2002-Bounce 弹飞绵羊-(分块)
- windows下学习nsq,以及基本使用概念