From 0980197ad9dd468445309427b0aef7851282c87f Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 23 Oct 2024 15:12:50 -0400 Subject: [PATCH] Containerfile: split long RUN lines They're getting quite long and hard to parse. Split for legibility. --- Containerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 4a3f20c..59c3317 100644 --- a/Containerfile +++ b/Containerfile @@ -39,10 +39,15 @@ COPY . /src WORKDIR /src RUN rm -vf /src/*.repo COPY --from=repos /etc/yum.repos.d/*.repo /src -RUN --mount=type=cache,target=/workdir --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rpm-ostree compose image \ - --image-config fedora-bootc-config.json --cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} /buildcontext/out.ociarchive +RUN --mount=type=cache,target=/workdir \ + --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \ + rpm-ostree compose image --image-config fedora-bootc-config.json \ + --cachedir=/workdir --format=ociarchive --initialize ${MANIFEST} \ + /buildcontext/out.ociarchive FROM oci-archive:./out.ociarchive # 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.ociarchive +RUN --mount=type=bind,from=builder,src=.,target=/var/tmp \ + --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \ + rm /buildcontext/out.ociarchive