From fc873d7a27e0077417b0963ae2553d0c5e7a0540 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 1 Sep 2026 15:29:36 +0200 Subject: oci: T9269: compress container image with XZ Can be compresed with up to 75% ratio. --- scripts/iso-to-oci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') 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 "" -- cgit v1.2.3