summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-09-01 15:29:36 +0200
committerChristian Breunig <christian@breunig.cc>2026-09-01 15:37:23 +0200
commitfc873d7a27e0077417b0963ae2553d0c5e7a0540 (patch)
treeddbeba14e03437fc2f6d49bd8a007257cd7499c9 /scripts
parenta0e175dc96016020b1e4b40cc6a50b66ef4dcf20 (diff)
downloadvyos-build-fc873d7a27e0077417b0963ae2553d0c5e7a0540.tar.gz
vyos-build-fc873d7a27e0077417b0963ae2553d0c5e7a0540.zip
oci: T9269: compress container image with XZ
Can be compresed with up to 75% ratio.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/iso-to-oci4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/iso-to-oci b/scripts/iso-to-oci
index f79c02a0..b2077d2c 100755
--- a/scripts/iso-to-oci
+++ b/scripts/iso-to-oci
@@ -57,7 +57,7 @@ unsquashfs -follow -dest "${UNSQUASHFS}/" "${ROOTFS}/live/filesystem.squashfs" >
VERSION="$(jq --raw-output .version "${ROOTFS}/version.json")"
# older ISOs predate ARM64 support and carry no architecture in version.json
ARCH="$(jq --raw-output '.architecture // "amd64"' "${ROOTFS}/version.json")"
-OCI_IMAGE="vyos-${VERSION}-oci-${ARCH}.tar"
+OCI_IMAGE="vyos-${VERSION}-oci-${ARCH}.tar.xz"
# fix locales for correct system configuration loading
sed -i 's/^LANG=.*$/LANG=C.UTF-8/' "${UNSQUASHFS}/etc/default/locale"
@@ -84,7 +84,7 @@ ln -s /opt/vyatta/etc/config "${UNSQUASHFS}/config"
# create docker image
echo "I: generate OCI container image ${OCI_IMAGE}"
-tar -C "${UNSQUASHFS}" -c . -f "${OCI_IMAGE}"
+XZ_OPT="-T0" tar --directory "${UNSQUASHFS}" --create . --xz --file "${OCI_IMAGE}"
echo "I: to import the previously generated OCI image to your local images run:"
echo ""