From 44258fdde40f9b0bd0a568476a7a9d4bf0a172d5 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 23 Oct 2024 15:21:21 -0400 Subject: [PATCH] Containerfile: clean up temporary hack for `--from` handling We have new enough rpm-ostree in Fedora for this now. --- Containerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Containerfile b/Containerfile index 47257d1..abc0b92 100644 --- a/Containerfile +++ b/Containerfile @@ -39,17 +39,12 @@ COPY . /src WORKDIR /src RUN rm -vf /src/*.repo COPY --from=repos /etc/yum.repos.d/*.repo /src -# Brutally inject releasever and repos into manifest file. This is a major hack -# until rpm-ostree does this on its own: https://github.com/coreos/rpm-ostree/pull/5136 -RUN --mount=type=bind,from=repos,src=/,dst=/repos source /repos/etc/os-release && \ - echo -e "\nreleasever: $VERSION_ID" >> ${MANIFEST} && \ - echo -e "\nrepos:\n" >> ${MANIFEST} && \ - dnf repolist --setopt=reposdir=. | tail -n +2 | cut -f1 -d' ' | sed 's/^/- /' >> ${MANIFEST} RUN --mount=type=cache,target=/workdir \ --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \ + --mount=type=bind,from=repos,src=/,dst=/repos \ rpm-ostree compose image --image-config fedora-bootc-config.json \ --cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} \ - /buildcontext/out.ociarchive + --source-root=/repos /buildcontext/out.ociarchive FROM oci-archive:./out.ociarchive # Need to reference builder here to force ordering. But since we have to run