Skip to content

Commit

Permalink
Merge pull request #327 from cgwalters/hack-extra
Browse files Browse the repository at this point in the history
hack: Allow injecting stuff into target/dev-rootfs
  • Loading branch information
cgwalters authored Feb 12, 2024
2 parents f818061 + 5510052 commit 2f2b313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.cosa
target
!target/dev-rootfs
2 changes: 2 additions & 0 deletions hack/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ FROM quay.io/centos-bootc/fedora-bootc:eln as build
RUN dnf config-manager --set-enabled eln-crb && dnf -y install cargo ostree-devel openssl-devel && dnf clean all
COPY . /build
WORKDIR /build
RUN mkdir -p /build/target/dev-rootfs # This can hold arbitrary extra content
# See https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/
# We aren't using the full recommendations there, just the simple bits.
RUN --mount=type=cache,target=/build/target --mount=type=cache,target=/var/roothome make bin-archive && mkdir -p /out && cp target/bootc.tar.zst /out

FROM quay.io/centos-bootc/fedora-bootc:eln
COPY --from=build /out/bootc.tar.zst /tmp
COPY --from=build /build/target/dev-rootfs/ /
RUN tar -C / --zstd -xvf /tmp/bootc.tar.zst && rm -vf /tmp/*

0 comments on commit 2f2b313

Please sign in to comment.