k3s/scripts/package-airgap
Derek Nola 8915e4c7f7
Replace gzip with pigz for faster builds (#4411)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-11-08 10:54:10 -08:00

17 lines
596 B
Bash
Executable File

#!/bin/bash
set -e -x
cd $(dirname $0)/..
. ./scripts/version.sh
airgap_image_file='scripts/airgap/image-list.txt'
images=$(cat "${airgap_image_file}")
xargs -n1 docker pull <<< "${images}"
docker save ${images} -o dist/artifacts/k3s-airgap-images-${ARCH}.tar
zstd --no-progress -T0 -16 -f --long=25 dist/artifacts/k3s-airgap-images-${ARCH}.tar -o dist/artifacts/k3s-airgap-images-${ARCH}.tar.zst
pigz -v -c dist/artifacts/k3s-airgap-images-${ARCH}.tar > dist/artifacts/k3s-airgap-images-${ARCH}.tar.gz
if [ ${ARCH} = amd64 ]; then
cp "${airgap_image_file}" dist/artifacts/k3s-images.txt
fi