debian-bootc-base-images/tests/Containerfile.test-derive
Colin Walters d5810bcd7e ci: Drop tier-x build, do build test case
As part of all of this we're de-emphasizing "tier-x" and focusing
on making it ergonomic to either build up from minimal, or down+up
from standard.

Second, also add a CI test for our derived image.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-25 08:27:20 -05:00

30 lines
901 B
Text

# This test case exercises using the fedora-bootc image as a builder
# to generate a minimal target image derived from CentOS Stream 10 content,
# and then further extends it in a secondary phase.
FROM quay.io/fedora/fedora-bootc:rawhide as repos
# This is intentionally a locally built image
FROM localhost/fedora-bootc as builder
RUN --mount=type=bind,from=repos,src=/,dst=/repos,rw /usr/libexec/bootc-base-imagectl build-rootfs --manifest=standard/manifest /repos /target-rootfs
# This pulls in the rootfs generated in the previous step
FROM scratch
COPY --from=builder /target-rootfs/ /
RUN <<EORUN
set -xeuo pipefail
. /usr/lib/os-release
test "$ID" = fedora
# And install a package
dnf -y install strace
dnf clean all
# Cleanup and lint
rm -rf /var/log /var/cache/* /var/lib/dnf
bootc container lint
EORUN
LABEL containers.bootc 1
ENV container=oci
STOPSIGNAL SIGRTMIN+3
CMD ["/sbin/init"]