From dca50089022313ba5f1ba2b5fe0c17a379b7e892 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Thu, 10 Jul 2025 09:50:54 -0400 Subject: [PATCH] container: add CUSTOM_CEPH_REPO_URL build argument Add a CUSTOM_CEPH_REPO_URL build argument to the Containerfile. This configures the container to consume ceph packages from the repo file indicated by this URL. This allows constructing a container image "the ceph way" without requiring the use of CI built packages. Signed-off-by: John Mulligan (cherry picked from commit ec3be940fe8982be9633624f3bea01041b1fb215) --- container/Containerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/container/Containerfile b/container/Containerfile index 7eb95923651..e9ca0276cd3 100644 --- a/container/Containerfile +++ b/container/Containerfile @@ -22,6 +22,8 @@ ARG OSD_FLAVOR="default" # (optional) Should be 'true' for CI builds (pull from shaman, etc.) ARG CI_CONTAINER="true" +# (optional, for hackers) Use the following URL for ceph repo. +ARG CUSTOM_CEPH_REPO_URL RUN /bin/echo -e "\ FROM_IMAGE: ${FROM_IMAGE}\n\ @@ -85,6 +87,11 @@ RUN set -ex && \ # Ceph repo RUN --mount=type=secret,id=prerelease_creds set -ex && \ + if [ "$CUSTOM_CEPH_REPO_URL" ]; then \ + curl -L -o /tmp/custom-ceph.repo "$CUSTOM_CEPH_REPO_URL" && \ + mv /tmp/custom-ceph.repo /etc/yum.repos.d/custom-ceph.repo && \ + exit 0 ; \ + fi && \ rpm --import 'https://download.ceph.com/keys/release.asc' && \ ARCH=$(arch); if [ "${ARCH}" == "aarch64" ]; then ARCH="arm64"; fi ;\ IS_RELEASE=0 ;\ -- 2.47.3