From aae17241d8963666834ac02af32f81a2df0c3608 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 30 Jan 2025 17:23:20 -0500 Subject: [PATCH] Rework to stop using removed buildah feature We can't rely on https://github.com/containers/buildah/issues/5952 anymore. Signed-off-by: Colin Walters --- .gitlab-ci.yml | 13 ++++++++++--- Containerfile | 19 +------------------ Containerfile.base | 22 +++++++--------------- 3 files changed, 18 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef4c96e..54c9329 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,19 @@ variables: .build-image: stage: build - image: quay.io/buildah/stable:v1.38.0 + # For newer rpm-ostree + image: registry.gitlab.com/fedora/bootc/base-images-dev/fedora-bootc-dev:rawhide needs: [] build: extends: .build-image stage: build script: | - buildah bud -f Containerfile.base --no-cache --security-opt=label=disable --cap-add=all --device /dev/fuse -t ${IMAGE_PREFIX}-base . - buildah bud -f Containerfile --no-cache --from ${IMAGE_PREFIX}-base -t ${IMAGE_PREFIX}-standard . + # Necessary for nested containerization + export BUILDAH_ISOLATION=chroot + podman build -f Containerfile.base --no-cache --security-opt=label=disable --cap-add=all --device /dev/fuse -t ${IMAGE_PREFIX}-base:tmp . + rpm-ostree experimental compose build-chunked-oci --bootc --format-version=1 \ + --from=${IMAGE_PREFIX}-base:tmp --output containers-storage:${IMAGE_PREFIX}-base + podman build -f Containerfile --no-cache --from ${IMAGE_PREFIX}-base -t ${IMAGE_PREFIX}-standard:tmp . + rpm-ostree experimental compose build-chunked-oci --bootc --format-version=1 \ + --from=${IMAGE_PREFIX}-standard:tmp --output containers-storage:${IMAGE_PREFIX}-standard diff --git a/Containerfile b/Containerfile index f21a91e..49bd956 100644 --- a/Containerfile +++ b/Containerfile @@ -1,7 +1,7 @@ # This generates the default base image. # This is a local reference by default because we haven't shipped this image yet. -FROM localhost/fedora-bootc:base as rootfs +FROM localhost/fedora-bootc:base # Drop our package sets into /usr/share/doc, so that other things can parse it COPY packages*.txt /usr/share/doc/fedora-bootc/ # Overlay our defaults @@ -40,20 +40,3 @@ dnf clean all rm -vrf /var/log /var/cache /var/lib/dnf bootc container lint EORUN - -# This image just needs rpm-ostree in the end that has -# https://github.com/coreos/rpm-ostree/issues/5221 -FROM registry.gitlab.com/fedora/bootc/base-images-dev/fedora-bootc-dev:rawhide as builder -RUN --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \ - --mount=from=rootfs,dst=/rootfs <