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

Commit 2df71b6

Browse files
committed
Use gzip to compress system-docker images for dev build
1 parent c126ebe commit 2df71b6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/tar-images

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ if [ -e ".make-vmware" ]; then
1717
IMAGES="$IMAGES rancher/os-openvmtools:${OPEN_VMTOOLS_VERSION}"
1818
fi
1919

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

0 commit comments

Comments
 (0)