Skip to content

Commit bbf8c6e

Browse files
authored
Merge pull request #258 from cgwalters/add-hack-container
hack/Containerfile: New file for local container builds
2 parents ee086d0 + 7ba823a commit bbf8c6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hack/Containerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This container build is just a demo effectively; it shows how one might
2+
# build bootc in a container flow, using Fedora ELN as the target.
3+
FROM quay.io/centos-bootc/fedora-bootc:eln as build
4+
RUN dnf config-manager --set-enabled eln-crb && dnf -y install cargo ostree-devel openssl-devel && dnf clean all
5+
COPY . /build
6+
WORKDIR /build
7+
# See https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/
8+
# We aren't using the full recommendations there, just the simple bits.
9+
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
10+
11+
FROM quay.io/centos-bootc/fedora-bootc:eln
12+
COPY --from=build /out/bootc.tar.zst /tmp
13+
RUN tar -C / --zstd -xvf /tmp/bootc.tar.zst && rm -vf /tmp/*

0 commit comments

Comments
 (0)