docker save 批量导出脚本

[root@vultr home]# cat docker_sove.sh
docker images > images.txt
awk '{print $1}' images.txt > images_cut.txt
sed -i '1d' images_cut.txt
while read LINE
do
docker save $LINE > ${LINE//\//_}.tar
echo ok
done < images_cut.txt
echo finish

posted on 2018-06-06 15:36  net2817  阅读(570)  评论(0编辑  收藏  举报

导航