Docker image批量save和load
docker image批量save和load
·
save
docker images > /root/kolla/images.txt
awk '{print $1}' /root/kolla/images.txt > /root/kolla/images_cut.txt
while read LINE
do
#echo $LINE
docker save $LINE > /home/$LINE.tar
echo ok
done < /root/kolla/images_cut.txt
echo finish
load
#!/bin/sh
#============ get the file name ===========
Folder_A="/home/lokolla"
for file_a in ${Folder_A}/*; do
temp_file=`basename $file_a`
# echo $temp_file
docker load < /home/lokolla/$temp_file
echo ok
done
echo finish
更多推荐
已为社区贡献2条内容
所有评论(0)