From a8f89081849d6a3d1ffaec31c75bc9e14fb41fb9 Mon Sep 17 00:00:00 2001 From: Wesley van Tilburg Date: Sun, 22 Feb 2026 15:37:25 +0100 Subject: [PATCH] ci: rework build --- Containerfile | 24 ++++++++++++++++++++++++ builder.sh | 5 ++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..22c1d8d --- /dev/null +++ b/Containerfile @@ -0,0 +1,24 @@ +ARG IMAGE=base +ARG VERSION=44 + +FROM quay.io/fedora/fedora:${VERSION} as builder + +#Install deps and the latest rpm-ostree +RUN dnf -y install rpm-ostree selinux-policy-targeted python3 && dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree + +#Copy all files into the container and set permissions +COPY . /src +RUN chmod -R a=rX,u+w /src +WORKDIR /src + +#Build the wanted image and version +RUN ./builder.sh ${IMAGE} ${VERSION} + +# Create the container and set the labels +FROM scratch +COPY --from=builder /src/images/${IMAGE}/manifest.ociarchive / +LABEL containers.bootc 1 +ENV container=oci +# Make systemd the default +STOPSIGNAL SIGRTMIN+3 +CMD ["/sbin/init"] diff --git a/builder.sh b/builder.sh index 652d867..4a3c2bf 100755 --- a/builder.sh +++ b/builder.sh @@ -62,7 +62,6 @@ else echo "No postprocess.sh found in ${IMAGE_DIR}, skipping." fi - # --- COMPOSE IMAGE --- ARGS=( "--cachedir=cache" @@ -70,7 +69,7 @@ ARGS=( "--max-layers=96" ) -rpm-ostree compose image \ +rpm-ostree compose rootfs \ "${ARGS[@]}" \ "$MANIFEST" \ - "$OUTPUT" + "$OUTPUT" \ No newline at end of file