Last active
April 11, 2022 09:22
-
-
Save qwadro/f59baf62fc7aff6eb8e738b8af636211 to your computer and use it in GitHub Desktop.
Revisions
-
qwadro renamed this gist
Apr 11, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
qwadro revised this gist
Apr 11, 2022 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ for a in $(docker images | awk '{ print $1 "?" $2 }' | grep -v REPOSITORY ) do name=$(echo $a | cut -d? -f1) version=$(echo $a | cut -d? -f2) shortname=${name##*/} echo exporting docker image: $name with version $version docker save $name:$version | gzip > "$shortname"_"$version".tar.gz echo $shortname=$version >> ../versions.txt done -
qwadro created this gist
Apr 4, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ docker images | awk '{print $1 " " $2 " " $3 }' | tr -c "a-z A-Z0-9_.\n-" "%" | while read REPOSITORY TAG IMAGE_ID do echo "== Saving $REPOSITORY $TAG $IMAGE_ID ==" docker save -o $REPOSITORY-$TAG-$IMAGE_ID.tar $IMAGE_ID done