码迷,mamicode.com
首页 > 数据库 > 详细

快速获取批量处理Docker镜像SQL语句

时间:2019-11-25 11:25:38      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:develop   获取   concat   bsp   EOS   select   docke   拼接   替换   

1、获取批量pull语句
select concat(docker pull develop-harbor.geostar.com.cn/, t.name, :, t1.tag) name from docker_image t join docker_image_tag t1 on t.image_id = t1.image_id where t1.tag = 7.19138.20191101 order by name asc;

2、获取批量save语句(注意:每行的“\”后面的空格需要全部替换为空字符串,然后在前面拼接“docker save”,在后面拼接“> geoglobe_server_7.19138.20191101_docker_images.tar”)
select concat(develop-harbor.geostar.com.cn/, t.name, :, t1.tag,  \) name from docker_image t join docker_image_tag t1 on t.image_id = t1.image_id where t1.tag = 7.19138.20191101 order by name asc;

3、获取批量tag语句
select concat(docker tag develop-harbor.geostar.com.cn/, t.name, :, t1.tag,  192.168.1.231:5000/, t.name, :, t1.tag) name from docker_image t join docker_image_tag t1 on t.image_id = t1.image_id where t1.tag = 7.19138.20191101 order by name asc;

4、获取批量push语句
select concat(docker push 192.168.1.231:5000/, t.name, :, t1.tag) name from docker_image t join docker_image_tag t1 on t.image_id = t1.image_id where t1.tag = 7.19138.20191101 order by name asc;

 

快速获取批量处理Docker镜像SQL语句

标签:develop   获取   concat   bsp   EOS   select   docke   拼接   替换   

原文地址:https://www.cnblogs.com/nihaorz/p/11926237.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!