Commit abce1372 by amir

add new scripts

parent 1d827472
#!/bin/bash
gzfile="containers.tar"
gzcmpfile=$gzfile
gzcmpfile+=".gz"
rm "$gzcmpfile"
touch "$gzfile"
while read -r line ; do
name=$(echo "$line" | sed -r 's/[.:/]+/_/g')
echo "Processing $line"
name+=".tar"
docker save -o "$name" "$line"
tar rvf "$gzfile" "$name"
rm "$name"
done < <(docker ps | awk '{print $2}' | grep -v ID)
echo "gzipping..."
gzip "$gzfile"
echo "cleaning..."
#rm "$gzfile"
\ No newline at end of file
#!/bin/bash
tarfile="containers.tar"
gzcmpfile=$tarfile
gzcmpfile+=".gz"
gunzip "$gzcmpfile"
tar xvf "$tarfile"
rm "$tarfile"
while read -r line ; do
echo "extracting image from $line"
docker load --input "$line"
rm "$line"
done < <(ls -l *.tar | awk '{print $9}')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment