Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Use gzip to compress system-docker images for dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
niusmallnan committed May 13, 2018
1 parent c126ebe commit 2df71b6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/tar-images
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ if [ -e ".make-vmware" ]; then
IMAGES="$IMAGES rancher/os-openvmtools:${OPEN_VMTOOLS_VERSION}"
fi

echo "tar-images: docker save ${IMAGES} > build/images.tar"
docker save ${IMAGES} | xz > build/images.tar
echo "tar-images: docker save ${IMAGES}"
if [ "$COMPRESS" == "" ]; then
docker save ${IMAGES} | gzip > build/images.tar
else
# system-docker can not load images which compressed by xz with a compression level of 9
# decompression consumes more memory if using level 9
# the default compression level for xz is 6
docker save ${IMAGES} | xz -6 -e > build/images.tar
fi
echo "tar-images: DONE"

0 comments on commit 2df71b6

Please sign in to comment.