]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
container: add CUSTOM_CEPH_REPO_URL build argument
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 10 Jul 2025 13:50:54 +0000 (09:50 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 11 Aug 2025 19:02:26 +0000 (15:02 -0400)
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 <jmulligan@redhat.com>
container/Containerfile

index 7eb9592365115230366c835c8622cd210db74b60..e9ca0276cd3f018e95259eb0694ffa0abb49085b 100644 (file)
@@ -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 ;\