mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
Add an entrypoint that basically everyone can start adding to their builds which performs some basic static analysis for known problems. Closes : #216 Co-authored-by: Joseph Marrero <jmarrero@redhat.com> Co-authored-by: Huijing Hei <hhei@redhat.com> Co-authored-by: Yasmin de Souza <ydesouza@redhat.com> Signed-off-by: Steven Presti <spresti@redhat.com> Signed-off-by: Colin Walters <walters@verbum.org>
20 lines
909 B
Docker
20 lines
909 B
Docker
# Build bootc from the current git into a c9s-bootc container image.
|
|
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:40 to target
|
|
# Fedora instead.
|
|
ARG base=quay.io/centos-bootc/centos-bootc:stream9
|
|
FROM $base as build
|
|
COPY hack/build.sh /build.sh
|
|
RUN /build.sh && rm -v /build.sh
|
|
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 test-bin-archive && mkdir -p /out && cp target/bootc.tar.zst /out
|
|
|
|
FROM $base
|
|
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/*
|
|
RUN bootc container lint
|