Files
OrionOS/iso/docker/Dockerfile.arm64
T
nmemmertandClaude Sonnet 4.6 983932a40b Fix ARM64 Dockerfile: use HTTP for ALARM tarball download
os.archlinuxarm.org has a TLS cert mismatch (cert SAN doesn't cover the
hostname). ALARM officially distributes over HTTP, not HTTPS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-24 11:15:50 -04:00

57 lines
2.0 KiB
Docker

# OrionOS ARM64 ISO builder
# Stage 1 (alpine): downloads the official Arch Linux ARM rootfs via bsdtar.
# Stage 2 (scratch): installs packages and compiles OrionOS natively in ALARM.
# ── Stage 1: fetch and verify ALARM rootfs ────────────────────────────
FROM --platform=linux/arm64 alpine:3.20 AS alarm-fetch
# libarchive-tools provides bsdtar, which preserves ALARM's merged-usr symlinks
# (BusyBox tar mishandles /bin → usr/bin symlinks in ALARM)
RUN apk add --no-cache curl libarchive-tools
RUN curl -fL --retry 3 --progress-bar \
http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz \
-o /tmp/alarm.tar.gz && \
mkdir /alarm-root && \
bsdtar -xpf /tmp/alarm.tar.gz -C /alarm-root && \
rm /tmp/alarm.tar.gz && \
# Verify extraction produced a usable ALARM environment
test -f /alarm-root/usr/bin/bash || \
(echo "ERROR: ALARM extraction failed — /usr/bin/bash missing" && exit 1)
# ── Stage 2: Arch Linux ARM build environment ─────────────────────────
FROM --platform=linux/arm64 scratch
COPY --from=alarm-fetch /alarm-root/ /
# ALARM uses merged-usr (/bin → usr/bin symlink). Docker's default /bin/sh
# lookup fails when the symlink isn't resolved yet — use the absolute path.
SHELL ["/usr/bin/bash", "-c"]
# Add DisableSandbox inside [options] (not at file end where it lands in [aur])
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"]