# OrionOS ARM64 ISO builder # Stage 1: alpine downloads the official Arch Linux ARM rootfs (~300MB, Docker-cached). # Stage 2: builds OrionOS natively inside that ALARM environment. # Runs natively on Apple Silicon — no QEMU emulation needed. # ── Stage 1: fetch ALARM rootfs ─────────────────────────────────────── FROM --platform=linux/arm64 alpine:3.20 AS alarm-fetch RUN apk add --no-cache curl RUN mkdir /alarm-root && \ curl -fL https://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz | \ tar xzf - -C /alarm-root 2>/dev/null || true # ── Stage 2: Arch Linux ARM build environment ───────────────────────── FROM --platform=linux/arm64 scratch COPY --from=alarm-fetch /alarm-root/ / # Add DisableSandbox inside [options] (appending to file-end can land it # in a later section like [aur] where it is silently ignored) RUN sed -i '/^\[options\]/a DisableSandbox' /etc/pacman.conf RUN pacman-key --init && pacman-key --populate archlinuxarm RUN pacman -Syu --noconfirm && \ pacman -S --noconfirm \ archiso \ base-devel \ libx11 \ libxft \ fontconfig \ freetype2 \ imlib2 \ imagemagick \ fakeroot \ git \ sudo \ && pacman -Scc --noconfirm WORKDIR /orionos COPY . . RUN make RUN bash themes/wallpapers/generate-default.sh || true ENTRYPOINT ["/orionos/iso/docker/entrypoint-arm64.sh"]