Containerfile: clean up temporary hack for `--from` handling
We have new enough rpm-ostree in Fedora for this now.
This commit is contained in:
parent
908c347bb9
commit
44258fdde4
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue