diff --git a/Containerfile b/Containerfile index abc0b92..a54f1c9 100644 --- a/Containerfile +++ b/Containerfile @@ -29,24 +29,52 @@ FROM quay.io/fedora/fedora:rawhide as repos FROM quay.io/fedora/fedora:41 as builder RUN dnf -y install rpm-ostree selinux-policy-targeted ARG MANIFEST=fedora-bootc.yaml -COPY --from=repos /etc/dnf/vars /etc/dnf/vars -COPY --from=repos /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-* /etc/pki/rpm-gpg -# The input git repository has .repo files committed to git rpm-ostree has historically -# emphasized that. But here, we are fetching the repos from the container base image. -# So copy the source, and delete the hardcoded ones in git, and use the container base -# image ones. We can drop the ones commited to git when we hard switch to Containerfile. + +# Copy in the source code COPY . /src WORKDIR /src -RUN rm -vf /src/*.repo -COPY --from=repos /etc/yum.repos.d/*.repo /src + +# Construct the base rootfs 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} \ - --source-root=/repos /buildcontext/out.ociarchive + --mount=type=bind,from=repos,src=/,dst=/repos <