@@ -7,14 +7,20 @@ ARG MANIFEST=centos-stream-10-tier1.yaml
77RUN --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm -vf /buildcontext/*.repo
88# XXX: we should just make sure our in-tree c9s repo points to the c9s paths and doesn't require vars to avoid these steps entirely
99COPY --from=repos /etc/dnf/vars /etc/dnf/vars
10+ # The input git repository has .repo files committed to git rpm-ostree has historically
11+ # emphasized that. But here, we are fetching the repos from the container base image.
12+ # So copy the source, and delete the hardcoded ones in git, and use the container base
13+ # image ones. We can drop the ones commited to git when we hard switch to Containerfile.
14+ COPY . /src
15+ WORKDIR /src
16+ RUN rm -vf /src/*.repo
1017COPY --from=repos /etc/yum.repos.d/centos.repo c10s.repo
1118COPY --from=repos /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg
1219# rpm-ostree doesn't honor /etc/dnf/vars right now
1320RUN for n in $(ls /etc/dnf/vars); do v=$(cat /etc/dnf/vars/$n); sed -ie s,\$${n},$v, c10s.repo; done
1421RUN --mount=type=cache,target=/workdir --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \
15- cp -a /buildcontext /src && rm -vf /src/*.repo && cp -a c10s.repo /src && ls -al /src && \
16- rpm-ostree compose image --image-config /buildcontext/centos-bootc-config.json \
17- --cachedir=/workdir --format=ociarchive --initialize /src/${MANIFEST} /buildcontext/out.ociarchive
22+ rpm-ostree compose image --image-config centos-bootc-config.json \
23+ --cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} /buildcontext/out.ociarchive
1824
1925FROM oci-archive:./out.ociarchive
2026# Need to reference builder here to force ordering. But since we have to run
0 commit comments