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 <walters@verbum.org>
This commit is contained in:
Colin Walters committed 2025-02-07 13:42:48 -05:00
1 parent 237acccc60
commit aae17241d8
3 files changed
+18 -36

No files matched your search

+1 -18
View File
@@ -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 <<EORUN
set -xeuo pipefail
rm /buildcontext/out.oci -rf
rpm-ostree experimental compose build-chunked-oci --bootc --format-version=1 \
--rootfs=/rootfs --output /buildcontext/out.oci
EORUN
FROM oci:./out.oci
# Need to reference builder here to force ordering. But since we have to run
# something anyway, we might as well cleanup after ourselves.
RUN --mount=type=bind,from=builder,src=.,target=/var/tmp \
--mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm /buildcontext/out.oci -rf