快速获取批量处理Docker镜像SQL语句
Posted Nihaorz
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了快速获取批量处理Docker镜像SQL语句相关的知识,希望对你有一定的参考价值。
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语句的主要内容,如果未能解决你的问题,请参考以下文章