From 5f19d907793fc2307af1ec2ccee5ecb78f9d8248 Mon Sep 17 00:00:00 2001 From: Sami Altamimi <139174515+saminaltamimi@users.noreply.github.com> Date: Thu, 15 Jan 2026 18:07:12 -0600 Subject: [PATCH 1/2] containerfile: use a separate build stage for bootc Using a build stage in a separate image, we don't pollute our base image with issues like bootc lint complaining about git not being in sysusers. --- Containerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Containerfile b/Containerfile index e091192..c467a55 100644 --- a/Containerfile +++ b/Containerfile @@ -1,3 +1,9 @@ +FROM docker.io/archlinux/archlinux:latest AS builder +RUN pacman -Syu --noconfirm make git rust go-md2man ostree glibc +WORKDIR /build/bootc +RUN git clone "https://github.com/bootc-dev/bootc.git" . && \ + make bin install-all DESTDIR=/output + FROM docker.io/archlinux/archlinux:latest # Move everything from `/var` to `/usr/lib/sysimage` so behavior around pacman remains the same on `bootc usroverlay`'d systems @@ -8,16 +14,13 @@ RUN pacman -Syu --noconfirm RUN pacman -Sy --noconfirm base dracut linux linux-firmware ostree btrfs-progs e2fsprogs xfsprogs dosfstools skopeo dbus dbus-glib glib2 ostree shadow && pacman -S --clean --noconfirm +COPY --from=builder /output / + # https://github.com/bootc-dev/bootc/issues/1801 RUN --mount=type=tmpfs,dst=/tmp --mount=type=tmpfs,dst=/root \ - pacman -S --noconfirm make git rust go-md2man && \ - git clone "https://github.com/bootc-dev/bootc.git" /tmp/bootc && \ - make -C /tmp/bootc bin install-all && \ printf "systemdsystemconfdir=/etc/systemd/system\nsystemdsystemunitdir=/usr/lib/systemd/system\n" | tee /usr/lib/dracut/dracut.conf.d/30-bootcrew-fix-bootc-module.conf && \ printf 'reproducible=yes\nhostonly=no\ncompress=zstd\nadd_dracutmodules+=" ostree bootc "' | tee "/usr/lib/dracut/dracut.conf.d/30-bootcrew-bootc-container-build.conf" && \ - dracut --force "$(find /usr/lib/modules -maxdepth 1 -type d | grep -v -E "*.img" | tail -n 1)/initramfs.img" && \ - pacman -Rns --noconfirm make git rust go-md2man && \ - pacman -S --clean --noconfirm + dracut --force "$(find /usr/lib/modules -maxdepth 1 -type d | grep -v -E "*.img" | tail -n 1)/initramfs.img" # Necessary for general behavior expected by image-based systems RUN sed -i 's|^HOME=.*|HOME=/var/home|' "/etc/default/useradd" && \ From 0de5ea31390852ec2cbea2e885fd1dafb5105f13 Mon Sep 17 00:00:00 2001 From: Sami Altamimi <139174515+saminaltamimi@users.noreply.github.com> Date: Thu, 15 Jan 2026 18:28:27 -0600 Subject: [PATCH 2/2] containerfile: add missing dependency --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index c467a55..eb05cd7 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,5 @@ FROM docker.io/archlinux/archlinux:latest AS builder -RUN pacman -Syu --noconfirm make git rust go-md2man ostree glibc +RUN pacman -Syu --noconfirm make git rust go-md2man ostree glibc pkgconf WORKDIR /build/bootc RUN git clone "https://github.com/bootc-dev/bootc.git" . && \ make bin install-all DESTDIR=/output