Last active
July 9, 2016 14:24
-
-
Save asaf400/2c6f90bb278255adb6058738c5715274 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for image in $1; do | |
IFS='/' read -ra ADDR <<< "$image" | |
len=${#ADDR[@]} | |
#echo $(expr $len - 1) | |
file=${ADDR[$(expr $len - 1)]} | |
echo Docker Working on $file.. | |
docker save $image > "$file.tar" | |
echo /////// | |
done; | |
echo Compressing Files.. | |
7za a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -sdel -v400m newimages.7z *tar | |
# Doesnt work because 7z doesn't suport multi volume updates.. | |
echo Removing temporary file $file. | |
rm -rf *tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment