diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-08-30 22:10:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-30 22:10:07 +0200 |
| commit | a02be72903ac43a78b5fa0bbeaaac15e632205e7 (patch) | |
| tree | dc9c33a10bb854d0b53f38b5738c78b15e995f34 /scripts | |
| parent | 1f43b631a78257262e74c4d82a0e515e53cd75d4 (diff) | |
| parent | c6a5b386b67ca6a3ebd146a29f9d88a49eeca823 (diff) | |
| download | vyos-build-a02be72903ac43a78b5fa0bbeaaac15e632205e7.tar.gz vyos-build-a02be72903ac43a78b5fa0bbeaaac15e632205e7.zip | |
Merge pull request #1282 from c-po/oci-image-arm64
oci: T9265: add support for ARM64 container image generation
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/iso-to-oci | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/iso-to-oci b/scripts/iso-to-oci index 87d1474a..255ded8b 100755 --- a/scripts/iso-to-oci +++ b/scripts/iso-to-oci @@ -1,7 +1,5 @@ #!/bin/bash -set -euo pipefail - cleanup() { if [[ -n "${WORKDIR:-}" && -d "${WORKDIR:-}" ]]; then rm -rf "${WORKDIR}" @@ -57,6 +55,8 @@ xorriso -osirrox on -indev "${ISO}" -extract /live/filesystem.squashfs "${ROOTFS echo "I: extracting squashfs content" unsquashfs -follow -dest "${UNSQUASHFS}/" "${ROOTFS}/live/filesystem.squashfs" >/dev/null 2>&1 VERSION="$(jq --raw-output .version "${ROOTFS}/version.json")" +ARCH="$(jq --raw-output .architecture "${ROOTFS}/version.json")" +OCI_IMAGE="vyos-${VERSION}-oci-${ARCH}.tar" # fix locales for correct system configuration loading sed -i 's/^LANG=.*$/LANG=C.UTF-8/' "${UNSQUASHFS}/etc/default/locale" @@ -82,12 +82,12 @@ rm -rf "${UNSQUASHFS}/opt/vyatta/share/vyatta-cfg/templates/system/option/perfor ln -s /opt/vyatta/etc/config "${UNSQUASHFS}/config" # create docker image -echo "I: generate OCI container image vyos-$VERSION.tar" -tar -C "${UNSQUASHFS}" -c . -f "vyos-${VERSION}.tar" +echo "I: generate OCI container image ${OCI_IMAGE}" +tar -C "${UNSQUASHFS}" -c . -f "${OCI_IMAGE}" echo "I: to import the previously generated OCI image to your local images run:" echo "" -echo " docker import vyos-$VERSION.tar vyos:$VERSION --change 'CMD ["/sbin/init"]'" +echo " docker import --platform=linux/$ARCH $OCI_IMAGE vyos:$VERSION --change 'CMD ["/sbin/init"]'" echo "" cleanup |
