From d4133a3c63778d177aa76d399746f80671690354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Fri, 6 Mar 2026 18:00:55 +0100 Subject: [PATCH] split Containerfile in two --- Containerfile | 34 ---------------------------------- Containerfile.base | 14 ++++++++++++++ Containerfile.sync | 21 +++++++++++++++++++++ build.sh | 4 ++++ 4 files changed, 39 insertions(+), 34 deletions(-) delete mode 100644 Containerfile create mode 100644 Containerfile.base create mode 100644 Containerfile.sync diff --git a/Containerfile b/Containerfile deleted file mode 100644 index a800110..0000000 --- a/Containerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM registry.fedoraproject.org/fedora:latest - -# Variables for URLs and versions -ARG CENTOS_VERSION=10 -ARG EPEL_VERSION=10 -ARG RSYNC_MIRROR=rsync://mirror.in2p3.fr -ARG CENTOS_PATH=/pub/linux/centos-stream/${CENTOS_VERSION}-stream/ -ARG EPEL_PATH=/pub/epel/${EPEL_VERSION}/ - -# Install required tools -RUN dnf install -y rsync nginx && \ - dnf clean all - -# Copy exclusions file -COPY rsync-excludes.txt /etc/rsync-excludes.txt - -# Build rsync options and sync repositories -RUN </dev/null; then PODMAN_ARGS+=( --from "localhost/mirrors/centos-stream-${CENTOS_VERSION}:latest" ) + PODMAN_ARGS+=( --file Containerfile.sync ) +else + PODMAN_ARGS+=( --file Containerfile.base ) fi # Build the image. # Note: during the build, the repositories will be synced and the result will be stored in the image. +echo podman build "${PODMAN_ARGS[@]}" . podman build "${PODMAN_ARGS[@]}" . podman tag "localhost/mirrors/centos-stream-${CENTOS_VERSION}:${TS}" "localhost/mirrors/centos-stream-${CENTOS_VERSION}:latest"