Current archiso package does not install initcpio hook files (confirmed: find /usr -path */initcpio/hooks/archiso returns nothing). Write the hook and its mkinitcpio install script directly into the profile airootfs so COPY carries them into the image without any package dependency. Hook finds ISO by archisosearchuuid= kernel param, waits up to 30s for the device to appear via blkid, mounts iso9660→squashfs→overlay onto /new_root. mkinitcpio detects /new_root is already mounted and succeeds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
84 lines
3.5 KiB
Docker
84 lines
3.5 KiB
Docker
FROM archlinux:latest
|
|
|
|
# Disable pacman's alpm sandbox (seccomp-incompatible inside Docker/BuildKit)
|
|
RUN echo "DisableSandbox" >> /etc/pacman.conf
|
|
|
|
# Update and install archiso + OrionOS build dependencies
|
|
RUN pacman -Syu --noconfirm && \
|
|
pacman -S --noconfirm \
|
|
archiso \
|
|
syslinux \
|
|
base-devel \
|
|
git \
|
|
libx11 \
|
|
libxft \
|
|
libxfixes \
|
|
libxext \
|
|
libpng \
|
|
imlib2 \
|
|
dbus \
|
|
pam \
|
|
fontconfig \
|
|
freetype2 \
|
|
xorg-server \
|
|
xorg-xinit \
|
|
feh \
|
|
picom \
|
|
alsa-utils \
|
|
ttf-dejavu \
|
|
noto-fonts \
|
|
pkgconf && \
|
|
pacman -Scc --noconfirm
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy OrionOS source
|
|
COPY . /build/orionos
|
|
|
|
# Bootstrap boot loader configs from the installed archiso releng profile.
|
|
# Copy only the .c32 binary modules — our repo provides syslinux.cfg.
|
|
# efiboot/ is needed for systemd-boot UEFI; fall back to a minimal loader.conf.
|
|
|
|
RUN mkdir -p /build/orionos/iso/profile/syslinux && \
|
|
cp /usr/share/archiso/configs/releng/syslinux/*.c32 \
|
|
/build/orionos/iso/profile/syslinux/ 2>/dev/null || true && \
|
|
if [ -d /usr/share/archiso/configs/releng/efiboot ]; then \
|
|
cp -r /usr/share/archiso/configs/releng/efiboot \
|
|
/build/orionos/iso/profile/; \
|
|
else \
|
|
mkdir -p /build/orionos/iso/profile/efiboot/loader/entries && \
|
|
printf 'timeout 4\ndefault arch-*\n' \
|
|
> /build/orionos/iso/profile/efiboot/loader/loader.conf; \
|
|
fi
|
|
|
|
# Build OrionOS components (full output — no tail so errors are visible)
|
|
RUN cd /build/orionos && make
|
|
|
|
# Install binaries into the staging root that archiso will include
|
|
RUN cd /build/orionos && \
|
|
install -Dm755 wm/orionwm /build/orionos/iso/profile/airootfs/usr/local/bin/orionwm && \
|
|
install -Dm755 deskbar/oriondeskbar /build/orionos/iso/profile/airootfs/usr/local/bin/oriondeskbar && \
|
|
install -Dm755 launcher/orionlauncher /build/orionos/iso/profile/airootfs/usr/local/bin/orionlauncher && \
|
|
install -Dm755 themes/orionwallpaper /build/orionos/iso/profile/airootfs/usr/local/bin/orionwallpaper && \
|
|
install -Dm755 orionnotify/orionnotify /build/orionos/iso/profile/airootfs/usr/local/bin/orionnotify && \
|
|
install -Dm755 orionlock/orionlock /build/orionos/iso/profile/airootfs/usr/local/bin/orionlock && \
|
|
install -Dm755 orionshot/orionshot /build/orionos/iso/profile/airootfs/usr/local/bin/orionshot && \
|
|
install -Dm755 orionclip/orionclip /build/orionos/iso/profile/airootfs/usr/local/bin/orionclip && \
|
|
install -Dm755 orionpkg/orionpkg /build/orionos/iso/profile/airootfs/usr/local/bin/orionpkg && \
|
|
mkdir -p /build/orionos/iso/profile/airootfs/usr/share/themes/ && \
|
|
cp -r themes/OrionOS /build/orionos/iso/profile/airootfs/usr/share/themes/ && \
|
|
install -Dm644 themes/picom.conf /build/orionos/iso/profile/airootfs/etc/orionos/picom.conf
|
|
|
|
# Generate default wallpaper
|
|
RUN mkdir -p /build/orionos/iso/profile/airootfs/usr/share/orionos/wallpapers && \
|
|
bash /build/orionos/themes/wallpapers/generate-default.sh 2>/dev/null && \
|
|
cp -f /build/orionos/themes/wallpapers/orionos-default.png \
|
|
/build/orionos/iso/profile/airootfs/usr/share/orionos/wallpapers/ 2>/dev/null || true
|
|
|
|
# Build the ISO at container runtime — mkarchiso needs --privileged (from docker run)
|
|
# Output goes to /dist which build-iso.sh mounts from the host.
|
|
CMD mkarchiso -v \
|
|
-w /tmp/iso-work \
|
|
-o /dist \
|
|
/build/orionos/iso/profile
|