From 9cb975d028dbe7525564e13ec3bcc62c2c94f959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kara=C5=9B?= Date: Thu, 14 Aug 2025 12:40:37 +0200 Subject: [PATCH 1/4] CLOUDP-338090 - remove operator images from `update_supported_dockerfiles.py` + fix recurrency --- scripts/update_supported_dockerfiles.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/update_supported_dockerfiles.py b/scripts/update_supported_dockerfiles.py index 7b97db130..b6038ea75 100755 --- a/scripts/update_supported_dockerfiles.py +++ b/scripts/update_supported_dockerfiles.py @@ -23,12 +23,7 @@ def get_repo_root(): SUPPORTED_IMAGES = ( "mongodb-agent", - "mongodb-kubernetes-database", - "mongodb-kubernetes-init-database", - "mongodb-kubernetes-init-appdb", "mongodb-enterprise-ops-manager", - "mongodb-kubernetes-init-ops-manager", - "mongodb-kubernetes", ) URL_LOCATION_BASE = "https://enterprise-operator-dockerfiles.s3.amazonaws.com/dockerfiles" @@ -47,7 +42,7 @@ def get_supported_variants_for_image(image: str) -> List[str]: return get_release()["supportedImages"][image]["variants"] -def get_supported_version_for_image(image: str) -> List[str]: +def get_supported_version(image: str) -> List[str]: image = get_image_name(image) return get_supported_version_for_image(image) @@ -89,7 +84,7 @@ def save_supported_dockerfiles(): """ for image in SUPPORTED_IMAGES: print("Image:", image) - versions = get_supported_version_for_image(image) + versions = get_supported_version(image) for version in versions: for variant in get_supported_variants_for_image(image): response = download_dockerfile_from_s3(image, version, variant) From 9d0c0d781f5c5a5b058811121b0541ea3a0498b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kara=C5=9B?= Date: Thu, 14 Aug 2025 12:55:02 +0200 Subject: [PATCH 2/4] Missing dockerfiles --- .../107.0.12.8669-1/ubi/Dockerfile | 7 +- .../107.0.15.8741-1/ubi/Dockerfile | 7 +- .../107.0.17.8771-1/ubi/Dockerfile | 60 +++++++++++++ .../108.0.11.8830-1/ubi/Dockerfile | 60 +++++++++++++ .../108.0.12.8846-1/ubi/Dockerfile | 65 ++++++++++++++ .../12.0.35.7911-1/ubi/Dockerfile | 7 +- .../13.37.0.9590-1/ubi/Dockerfile | 65 ++++++++++++++ .../7.0.17/ubi/Dockerfile | 84 ++++++++++++++++++ .../8.0.11/ubi/Dockerfile | 84 ++++++++++++++++++ .../8.0.12/ubi/Dockerfile | 84 ++++++++++++++++++ .../1.2.0/ubi/Dockerfile | 85 +++++++++++++++++++ .../1.2.0/ubi/Dockerfile | 33 +++++++ .../1.2.0/ubi/Dockerfile | 32 +++++++ .../1.2.0/ubi/Dockerfile | 24 ++++++ .../mongodb-kubernetes/1.2.0/ubi/Dockerfile | 36 ++++++++ 15 files changed, 730 insertions(+), 3 deletions(-) create mode 100644 public/dockerfiles/mongodb-agent/107.0.17.8771-1/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-agent/108.0.11.8830-1/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-agent/108.0.12.8846-1/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-agent/13.37.0.9590-1/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-enterprise-ops-manager/7.0.17/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-enterprise-ops-manager/8.0.11/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-enterprise-ops-manager/8.0.12/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-kubernetes-database/1.2.0/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-kubernetes-init-appdb/1.2.0/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-kubernetes-init-database/1.2.0/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-kubernetes-init-ops-manager/1.2.0/ubi/Dockerfile create mode 100644 public/dockerfiles/mongodb-kubernetes/1.2.0/ubi/Dockerfile diff --git a/public/dockerfiles/mongodb-agent/107.0.12.8669-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/107.0.12.8669-1/ubi/Dockerfile index b9f3f0b98..2ec0877ae 100644 --- a/public/dockerfiles/mongodb-agent/107.0.12.8669-1/ubi/Dockerfile +++ b/public/dockerfiles/mongodb-agent/107.0.12.8669-1/ubi/Dockerfile @@ -41,11 +41,16 @@ RUN mkdir -p /agent \ && touch /var/log/mongodb-mms-automation/readiness.log \ && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log - COPY --from=base /data/mongodb-agent.tar.gz /agent COPY --from=base /data/mongodb-tools.tgz /agent COPY --from=base /data/LICENSE /licenses/LICENSE +# Copy scripts to a safe location that won't be overwritten by volume mount +COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh +COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh +COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh +COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe + RUN tar xfz /agent/mongodb-agent.tar.gz \ && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ && chmod +x /agent/mongodb-agent \ diff --git a/public/dockerfiles/mongodb-agent/107.0.15.8741-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/107.0.15.8741-1/ubi/Dockerfile index b9f3f0b98..2ec0877ae 100644 --- a/public/dockerfiles/mongodb-agent/107.0.15.8741-1/ubi/Dockerfile +++ b/public/dockerfiles/mongodb-agent/107.0.15.8741-1/ubi/Dockerfile @@ -41,11 +41,16 @@ RUN mkdir -p /agent \ && touch /var/log/mongodb-mms-automation/readiness.log \ && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log - COPY --from=base /data/mongodb-agent.tar.gz /agent COPY --from=base /data/mongodb-tools.tgz /agent COPY --from=base /data/LICENSE /licenses/LICENSE +# Copy scripts to a safe location that won't be overwritten by volume mount +COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh +COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh +COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh +COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe + RUN tar xfz /agent/mongodb-agent.tar.gz \ && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ && chmod +x /agent/mongodb-agent \ diff --git a/public/dockerfiles/mongodb-agent/107.0.17.8771-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/107.0.17.8771-1/ubi/Dockerfile new file mode 100644 index 000000000..b9f3f0b98 --- /dev/null +++ b/public/dockerfiles/mongodb-agent/107.0.17.8771-1/ubi/Dockerfile @@ -0,0 +1,60 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + +ARG version + +LABEL name="MongoDB Agent" \ + version="${version}" \ + summary="MongoDB Agent" \ + description="MongoDB Agent" \ + vendor="MongoDB" \ + release="1" \ + maintainer="support@mongodb.com" + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper +# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ +RUN microdnf install -y --disableplugin=subscription-manager \ + cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs +# Dependencies for the Agent +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \ + net-snmp \ + net-snmp-agent-libs +RUN microdnf install -y --disableplugin=subscription-manager \ + hostname tar gzip procps jq \ + && microdnf upgrade -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /agent \ + && mkdir -p /var/lib/mongodb-mms-automation \ + && mkdir -p /var/log/mongodb-mms-automation/ \ + && chmod -R +wr /var/log/mongodb-mms-automation/ \ + # ensure that the agent user can write the logs in OpenShift + && touch /var/log/mongodb-mms-automation/readiness.log \ + && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log + + +COPY --from=base /data/mongodb-agent.tar.gz /agent +COPY --from=base /data/mongodb-tools.tgz /agent +COPY --from=base /data/LICENSE /licenses/LICENSE + +RUN tar xfz /agent/mongodb-agent.tar.gz \ + && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ + && chmod +x /agent/mongodb-agent \ + && mkdir -p /var/lib/automation/config \ + && chmod -R +r /var/lib/automation/config \ + && rm /agent/mongodb-agent.tar.gz \ + && rm -r mongodb-mms-automation-agent-* + +RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz + +USER 2000 +CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"] \ No newline at end of file diff --git a/public/dockerfiles/mongodb-agent/108.0.11.8830-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/108.0.11.8830-1/ubi/Dockerfile new file mode 100644 index 000000000..b9f3f0b98 --- /dev/null +++ b/public/dockerfiles/mongodb-agent/108.0.11.8830-1/ubi/Dockerfile @@ -0,0 +1,60 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + +ARG version + +LABEL name="MongoDB Agent" \ + version="${version}" \ + summary="MongoDB Agent" \ + description="MongoDB Agent" \ + vendor="MongoDB" \ + release="1" \ + maintainer="support@mongodb.com" + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper +# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ +RUN microdnf install -y --disableplugin=subscription-manager \ + cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs +# Dependencies for the Agent +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \ + net-snmp \ + net-snmp-agent-libs +RUN microdnf install -y --disableplugin=subscription-manager \ + hostname tar gzip procps jq \ + && microdnf upgrade -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /agent \ + && mkdir -p /var/lib/mongodb-mms-automation \ + && mkdir -p /var/log/mongodb-mms-automation/ \ + && chmod -R +wr /var/log/mongodb-mms-automation/ \ + # ensure that the agent user can write the logs in OpenShift + && touch /var/log/mongodb-mms-automation/readiness.log \ + && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log + + +COPY --from=base /data/mongodb-agent.tar.gz /agent +COPY --from=base /data/mongodb-tools.tgz /agent +COPY --from=base /data/LICENSE /licenses/LICENSE + +RUN tar xfz /agent/mongodb-agent.tar.gz \ + && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ + && chmod +x /agent/mongodb-agent \ + && mkdir -p /var/lib/automation/config \ + && chmod -R +r /var/lib/automation/config \ + && rm /agent/mongodb-agent.tar.gz \ + && rm -r mongodb-mms-automation-agent-* + +RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz + +USER 2000 +CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"] \ No newline at end of file diff --git a/public/dockerfiles/mongodb-agent/108.0.12.8846-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/108.0.12.8846-1/ubi/Dockerfile new file mode 100644 index 000000000..2ec0877ae --- /dev/null +++ b/public/dockerfiles/mongodb-agent/108.0.12.8846-1/ubi/Dockerfile @@ -0,0 +1,65 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + +ARG version + +LABEL name="MongoDB Agent" \ + version="${version}" \ + summary="MongoDB Agent" \ + description="MongoDB Agent" \ + vendor="MongoDB" \ + release="1" \ + maintainer="support@mongodb.com" + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper +# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ +RUN microdnf install -y --disableplugin=subscription-manager \ + cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs +# Dependencies for the Agent +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \ + net-snmp \ + net-snmp-agent-libs +RUN microdnf install -y --disableplugin=subscription-manager \ + hostname tar gzip procps jq \ + && microdnf upgrade -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /agent \ + && mkdir -p /var/lib/mongodb-mms-automation \ + && mkdir -p /var/log/mongodb-mms-automation/ \ + && chmod -R +wr /var/log/mongodb-mms-automation/ \ + # ensure that the agent user can write the logs in OpenShift + && touch /var/log/mongodb-mms-automation/readiness.log \ + && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log + +COPY --from=base /data/mongodb-agent.tar.gz /agent +COPY --from=base /data/mongodb-tools.tgz /agent +COPY --from=base /data/LICENSE /licenses/LICENSE + +# Copy scripts to a safe location that won't be overwritten by volume mount +COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh +COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh +COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh +COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe + +RUN tar xfz /agent/mongodb-agent.tar.gz \ + && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ + && chmod +x /agent/mongodb-agent \ + && mkdir -p /var/lib/automation/config \ + && chmod -R +r /var/lib/automation/config \ + && rm /agent/mongodb-agent.tar.gz \ + && rm -r mongodb-mms-automation-agent-* + +RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz + +USER 2000 +CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"] \ No newline at end of file diff --git a/public/dockerfiles/mongodb-agent/12.0.35.7911-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/12.0.35.7911-1/ubi/Dockerfile index b9f3f0b98..2ec0877ae 100644 --- a/public/dockerfiles/mongodb-agent/12.0.35.7911-1/ubi/Dockerfile +++ b/public/dockerfiles/mongodb-agent/12.0.35.7911-1/ubi/Dockerfile @@ -41,11 +41,16 @@ RUN mkdir -p /agent \ && touch /var/log/mongodb-mms-automation/readiness.log \ && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log - COPY --from=base /data/mongodb-agent.tar.gz /agent COPY --from=base /data/mongodb-tools.tgz /agent COPY --from=base /data/LICENSE /licenses/LICENSE +# Copy scripts to a safe location that won't be overwritten by volume mount +COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh +COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh +COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh +COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe + RUN tar xfz /agent/mongodb-agent.tar.gz \ && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ && chmod +x /agent/mongodb-agent \ diff --git a/public/dockerfiles/mongodb-agent/13.37.0.9590-1/ubi/Dockerfile b/public/dockerfiles/mongodb-agent/13.37.0.9590-1/ubi/Dockerfile new file mode 100644 index 000000000..2ec0877ae --- /dev/null +++ b/public/dockerfiles/mongodb-agent/13.37.0.9590-1/ubi/Dockerfile @@ -0,0 +1,65 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + +ARG version + +LABEL name="MongoDB Agent" \ + version="${version}" \ + summary="MongoDB Agent" \ + description="MongoDB Agent" \ + vendor="MongoDB" \ + release="1" \ + maintainer="support@mongodb.com" + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper +# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ +RUN microdnf install -y --disableplugin=subscription-manager \ + cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs +# Dependencies for the Agent +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \ + net-snmp \ + net-snmp-agent-libs +RUN microdnf install -y --disableplugin=subscription-manager \ + hostname tar gzip procps jq \ + && microdnf upgrade -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /agent \ + && mkdir -p /var/lib/mongodb-mms-automation \ + && mkdir -p /var/log/mongodb-mms-automation/ \ + && chmod -R +wr /var/log/mongodb-mms-automation/ \ + # ensure that the agent user can write the logs in OpenShift + && touch /var/log/mongodb-mms-automation/readiness.log \ + && chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log + +COPY --from=base /data/mongodb-agent.tar.gz /agent +COPY --from=base /data/mongodb-tools.tgz /agent +COPY --from=base /data/LICENSE /licenses/LICENSE + +# Copy scripts to a safe location that won't be overwritten by volume mount +COPY --from=base /opt/scripts/agent-launcher-shim.sh /usr/local/bin/agent-launcher-shim.sh +COPY --from=base /opt/scripts/setup-agent-files.sh /usr/local/bin/setup-agent-files.sh +COPY --from=base /opt/scripts/dummy-probe.sh /usr/local/bin/dummy-probe.sh +COPY --from=base /opt/scripts/dummy-readinessprobe.sh /usr/local/bin/dummy-readinessprobe + +RUN tar xfz /agent/mongodb-agent.tar.gz \ + && mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \ + && chmod +x /agent/mongodb-agent \ + && mkdir -p /var/lib/automation/config \ + && chmod -R +r /var/lib/automation/config \ + && rm /agent/mongodb-agent.tar.gz \ + && rm -r mongodb-mms-automation-agent-* + +RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz + +USER 2000 +CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"] \ No newline at end of file diff --git a/public/dockerfiles/mongodb-enterprise-ops-manager/7.0.17/ubi/Dockerfile b/public/dockerfiles/mongodb-enterprise-ops-manager/7.0.17/ubi/Dockerfile new file mode 100644 index 000000000..1bf48ce96 --- /dev/null +++ b/public/dockerfiles/mongodb-enterprise-ops-manager/7.0.17/ubi/Dockerfile @@ -0,0 +1,84 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + + +LABEL name="MongoDB Enterprise Ops Manager" \ + maintainer="support@mongodb.com" \ + vendor="MongoDB" \ + version="7.0.17" \ + release="1" \ + summary="MongoDB Enterprise Ops Manager Image" \ + description="MongoDB Enterprise Ops Manager" + + +ENV MMS_HOME /mongodb-ops-manager +ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties +ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf +ENV MMS_LOG_DIR ${MMS_HOME}/logs +ENV MMS_TMP_DIR ${MMS_HOME}/tmp + +EXPOSE 8080 + +# OpsManager docker image needs to have the MongoDB dependencies because the +# backup daemon is running its database locally + + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install --disableplugin=subscription-manager -y \ + cyrus-sasl \ + cyrus-sasl-gssapi \ + cyrus-sasl-plain \ + krb5-libs \ + libpcap \ + lm_sensors-libs \ + net-snmp \ + net-snmp-agent-libs \ + openldap \ + openssl \ + tar \ + rpm-libs \ + net-tools \ + procps-ng \ + ncurses + + +COPY --from=base /data/licenses /licenses/ + +COPY --from=base /data/scripts /opt/scripts + + + +RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-7.0.17.500.20250806T1728Z.tar.gz \ + && tar -xzf ops_manager.tar.gz \ + && rm ops_manager.tar.gz \ + && mv mongodb-mms* "${MMS_HOME}" + + +# permissions +RUN chmod -R 0777 "${MMS_LOG_DIR}" \ + && chmod -R 0777 "${MMS_TMP_DIR}" \ + && chmod -R 0775 "${MMS_HOME}/conf" \ + && chmod -R 0775 "${MMS_HOME}/jdk" \ + && mkdir "${MMS_HOME}/mongodb-releases/" \ + && chmod -R 0775 "${MMS_HOME}/mongodb-releases" \ + && chmod -R 0777 "${MMS_CONF_FILE}" \ + && chmod -R 0777 "${MMS_PROP_FILE}" + +# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh. +# For now we need to move into the templates directory. +RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template" + +USER 2000 + +# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this) +ENTRYPOINT [ "sleep infinity" ] + + diff --git a/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.11/ubi/Dockerfile b/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.11/ubi/Dockerfile new file mode 100644 index 000000000..f67b553c2 --- /dev/null +++ b/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.11/ubi/Dockerfile @@ -0,0 +1,84 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + + +LABEL name="MongoDB Enterprise Ops Manager" \ + maintainer="support@mongodb.com" \ + vendor="MongoDB" \ + version="8.0.11" \ + release="1" \ + summary="MongoDB Enterprise Ops Manager Image" \ + description="MongoDB Enterprise Ops Manager" + + +ENV MMS_HOME /mongodb-ops-manager +ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties +ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf +ENV MMS_LOG_DIR ${MMS_HOME}/logs +ENV MMS_TMP_DIR ${MMS_HOME}/tmp + +EXPOSE 8080 + +# OpsManager docker image needs to have the MongoDB dependencies because the +# backup daemon is running its database locally + + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install --disableplugin=subscription-manager -y \ + cyrus-sasl \ + cyrus-sasl-gssapi \ + cyrus-sasl-plain \ + krb5-libs \ + libpcap \ + lm_sensors-libs \ + net-snmp \ + net-snmp-agent-libs \ + openldap \ + openssl \ + tar \ + rpm-libs \ + net-tools \ + procps-ng \ + ncurses + + +COPY --from=base /data/licenses /licenses/ + +COPY --from=base /data/scripts /opt/scripts + + + +RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-8.0.11.500.20250715T1534Z.tar.gz \ + && tar -xzf ops_manager.tar.gz \ + && rm ops_manager.tar.gz \ + && mv mongodb-mms* "${MMS_HOME}" + + +# permissions +RUN chmod -R 0777 "${MMS_LOG_DIR}" \ + && chmod -R 0777 "${MMS_TMP_DIR}" \ + && chmod -R 0775 "${MMS_HOME}/conf" \ + && chmod -R 0775 "${MMS_HOME}/jdk" \ + && mkdir "${MMS_HOME}/mongodb-releases/" \ + && chmod -R 0775 "${MMS_HOME}/mongodb-releases" \ + && chmod -R 0777 "${MMS_CONF_FILE}" \ + && chmod -R 0777 "${MMS_PROP_FILE}" + +# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh. +# For now we need to move into the templates directory. +RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template" + +USER 2000 + +# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this) +ENTRYPOINT [ "sleep infinity" ] + + diff --git a/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.12/ubi/Dockerfile b/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.12/ubi/Dockerfile new file mode 100644 index 000000000..8c06be903 --- /dev/null +++ b/public/dockerfiles/mongodb-enterprise-ops-manager/8.0.12/ubi/Dockerfile @@ -0,0 +1,84 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + + +LABEL name="MongoDB Enterprise Ops Manager" \ + maintainer="support@mongodb.com" \ + vendor="MongoDB" \ + version="8.0.12" \ + release="1" \ + summary="MongoDB Enterprise Ops Manager Image" \ + description="MongoDB Enterprise Ops Manager" + + +ENV MMS_HOME /mongodb-ops-manager +ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties +ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf +ENV MMS_LOG_DIR ${MMS_HOME}/logs +ENV MMS_TMP_DIR ${MMS_HOME}/tmp + +EXPOSE 8080 + +# OpsManager docker image needs to have the MongoDB dependencies because the +# backup daemon is running its database locally + + +# Replace libcurl-minimal and curl-minimal with the full versions +# https://bugzilla.redhat.com/show_bug.cgi?id=1994521 +RUN microdnf install -y libssh libpsl libbrotli \ + && microdnf download curl libcurl \ + && rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \ + && microdnf remove -y libcurl-minimal curl-minimal + +RUN microdnf install --disableplugin=subscription-manager -y \ + cyrus-sasl \ + cyrus-sasl-gssapi \ + cyrus-sasl-plain \ + krb5-libs \ + libpcap \ + lm_sensors-libs \ + net-snmp \ + net-snmp-agent-libs \ + openldap \ + openssl \ + tar \ + rpm-libs \ + net-tools \ + procps-ng \ + ncurses + + +COPY --from=base /data/licenses /licenses/ + +COPY --from=base /data/scripts /opt/scripts + + + +RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-8.0.12.500.20250804T1959Z.tar.gz \ + && tar -xzf ops_manager.tar.gz \ + && rm ops_manager.tar.gz \ + && mv mongodb-mms* "${MMS_HOME}" + + +# permissions +RUN chmod -R 0777 "${MMS_LOG_DIR}" \ + && chmod -R 0777 "${MMS_TMP_DIR}" \ + && chmod -R 0775 "${MMS_HOME}/conf" \ + && chmod -R 0775 "${MMS_HOME}/jdk" \ + && mkdir "${MMS_HOME}/mongodb-releases/" \ + && chmod -R 0775 "${MMS_HOME}/mongodb-releases" \ + && chmod -R 0777 "${MMS_CONF_FILE}" \ + && chmod -R 0777 "${MMS_PROP_FILE}" + +# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh. +# For now we need to move into the templates directory. +RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template" + +USER 2000 + +# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this) +ENTRYPOINT [ "sleep infinity" ] + + diff --git a/public/dockerfiles/mongodb-kubernetes-database/1.2.0/ubi/Dockerfile b/public/dockerfiles/mongodb-kubernetes-database/1.2.0/ubi/Dockerfile new file mode 100644 index 000000000..3eaf2caa4 --- /dev/null +++ b/public/dockerfiles/mongodb-kubernetes-database/1.2.0/ubi/Dockerfile @@ -0,0 +1,85 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi8/ubi-minimal + + + +LABEL name="MongoDB Kubernetes Database" \ + version="1.2.0" \ + summary="MongoDB Kubernetes Database Image" \ + description="MongoDB Kubernetes Database Image" \ + vendor="MongoDB" \ + release="1" \ + maintainer="support@mongodb.com" + + + + + +ENV MMS_HOME /mongodb-automation +ENV MMS_LOG_DIR /var/log/mongodb-mms-automation + + + +RUN microdnf update -y && rm -rf /var/cache/yum + +# these are the packages needed for the agent +RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper +RUN microdnf install -y --disableplugin=subscription-manager \ + hostname \ + procps + + +# these are the packages needed for MongoDB +# (https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ "RHEL/CentOS 8" tab) +RUN microdnf install -y --disableplugin=subscription-manager \ + cyrus-sasl \ + cyrus-sasl-gssapi \ + cyrus-sasl-plain \ + krb5-libs \ + libcurl \ + lm_sensors-libs \ + net-snmp \ + net-snmp-agent-libs \ + openldap \ + openssl \ + jq \ + tar \ + xz-libs \ + findutils + + + +RUN ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2 + + +# Set the required perms +RUN mkdir -p "${MMS_LOG_DIR}" \ + && chmod 0775 "${MMS_LOG_DIR}" \ + && mkdir -p /var/lib/mongodb-mms-automation \ + && chmod 0775 /var/lib/mongodb-mms-automation \ + && mkdir -p /data \ + && chmod 0775 /data \ + && mkdir -p /journal \ + && chmod 0775 /journal \ + && mkdir -p "${MMS_HOME}" \ + && chmod -R 0775 "${MMS_HOME}" + + + + +# USER needs to be set for this image to pass RedHat verification. Some customers have these requirements as well +# It does not matter what number it is, as long as it is set to something. +# However, OpenShift will run the container as a random user, +# and the number in this configuration is not relevant. +USER 2000 + + +# The docker image doesn't have any scripts so by default does nothing +# The script will be copied in runtime from init containers and the operator is expected +# to override the COMMAND +ENTRYPOINT ["sleep infinity"] + + +COPY --from=base /data/licenses/mongodb-kubernetes-database /licenses/mongodb-kubernetes-database diff --git a/public/dockerfiles/mongodb-kubernetes-init-appdb/1.2.0/ubi/Dockerfile b/public/dockerfiles/mongodb-kubernetes-init-appdb/1.2.0/ubi/Dockerfile new file mode 100644 index 000000000..da91cdbb3 --- /dev/null +++ b/public/dockerfiles/mongodb-kubernetes-init-appdb/1.2.0/ubi/Dockerfile @@ -0,0 +1,33 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi8/ubi-minimal + +ARG version +LABEL name="MongoDB Kubernetes Init AppDB" \ + version="mongodb-kubernetes-init-appdb-${version}" \ + summary="MongoDB Kubernetes AppDB Init Image" \ + description="Startup Scripts for MongoDB Enterprise Application Database for Ops Manager" \ + release="1" \ + vendor="MongoDB" \ + maintainer="support@mongodb.com" + +COPY --from=base /data/readinessprobe /probes/readinessprobe +COPY --from=base /data/probe.sh /probes/probe.sh +COPY --from=base /data/scripts/ /scripts/ +COPY --from=base /data/licenses /licenses/ +COPY --from=base /data/version-upgrade-hook /probes/version-upgrade-hook + + +RUN microdnf -y update --nodocs \ + && microdnf -y install --nodocs tar gzip \ + && microdnf clean all + +COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz + + +RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \ + && rm /tools/mongodb_tools.tgz + +USER 2000 +ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ] diff --git a/public/dockerfiles/mongodb-kubernetes-init-database/1.2.0/ubi/Dockerfile b/public/dockerfiles/mongodb-kubernetes-init-database/1.2.0/ubi/Dockerfile new file mode 100644 index 000000000..c3a079e2c --- /dev/null +++ b/public/dockerfiles/mongodb-kubernetes-init-database/1.2.0/ubi/Dockerfile @@ -0,0 +1,32 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi8/ubi-minimal + +ARG version +LABEL name="MongoDB Kubernetes Init Database" \ + version="mongodb-kubernetes-init-database-${version}" \ + summary="MongoDB Kubernetes Database Init Image" \ + description="Startup Scripts for MongoDB Enterprise Database" \ + release="1" \ + vendor="MongoDB" \ + maintainer="support@mongodb.com" + +COPY --from=base /data/readinessprobe /probes/readinessprobe +COPY --from=base /data/probe.sh /probes/probe.sh +COPY --from=base /data/scripts/ /scripts/ +COPY --from=base /data/licenses /licenses/ + + +RUN microdnf -y update --nodocs \ + && microdnf -y install --nodocs tar gzip \ + && microdnf clean all + +COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz + + +RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \ + && rm /tools/mongodb_tools.tgz + +USER 2000 +ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ] diff --git a/public/dockerfiles/mongodb-kubernetes-init-ops-manager/1.2.0/ubi/Dockerfile b/public/dockerfiles/mongodb-kubernetes-init-ops-manager/1.2.0/ubi/Dockerfile new file mode 100644 index 000000000..7ee3744ce --- /dev/null +++ b/public/dockerfiles/mongodb-kubernetes-init-ops-manager/1.2.0/ubi/Dockerfile @@ -0,0 +1,24 @@ +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + +LABEL name="MongoDB Kubernetes Ops Manager Init" \ + maintainer="support@mongodb.com" \ + vendor="MongoDB" \ + version="mongodb-kubernetes-init-ops-manager-1.2.0" \ + release="1" \ + summary="MongoDB Kubernetes Ops Manager Init Image" \ + description="Startup Scripts for MongoDB Enterprise Ops Manager" + + +COPY --from=base /data/scripts /scripts +COPY --from=base /data/licenses /licenses + + +RUN microdnf -y update --nodocs \ + && microdnf clean all + + +USER 2000 +ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/backup-daemon-liveness-probe.sh", "/scripts/mmsconfiguration", "/scripts/backup-daemon-readiness-probe", "/opt/scripts/" ] diff --git a/public/dockerfiles/mongodb-kubernetes/1.2.0/ubi/Dockerfile b/public/dockerfiles/mongodb-kubernetes/1.2.0/ubi/Dockerfile new file mode 100644 index 000000000..fac49f0c7 --- /dev/null +++ b/public/dockerfiles/mongodb-kubernetes/1.2.0/ubi/Dockerfile @@ -0,0 +1,36 @@ +# +# Base Template Dockerfile for Operator Image. +# + +ARG imagebase +FROM ${imagebase} as base + +FROM registry.access.redhat.com/ubi9/ubi-minimal + + +LABEL name="MongoDB Kubernetes Operator" \ + maintainer="support@mongodb.com" \ + vendor="MongoDB" \ + version="1.2.0" \ + release="1" \ + summary="MongoDB Kubernetes Operator Image" \ + description="MongoDB Kubernetes Operator Image" + + +# Building an UBI-based image: https://red.ht/3n6b9y0 +RUN microdnf update \ + --disableplugin=subscription-manager \ + --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms -y \ + && rm -rf /var/cache/yum +RUN microdnf install -y glibc-langpack-en + + + + +COPY --from=base /data/mongodb-kubernetes-operator /usr/local/bin/mongodb-kubernetes-operator +COPY --from=base /data/om_version_mapping.json /usr/local/om_version_mapping.json +COPY --from=base /data/licenses /licenses/ + +USER 2000 + +ENTRYPOINT exec /usr/local/bin/mongodb-kubernetes-operator From 628dd151a64fe4a0d14f6fa7ac829513593aa7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kara=C5=9B?= Date: Thu, 14 Aug 2025 12:55:13 +0200 Subject: [PATCH 3/4] Fixed recurrency --- scripts/update_supported_dockerfiles.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/update_supported_dockerfiles.py b/scripts/update_supported_dockerfiles.py index b6038ea75..3778bddad 100755 --- a/scripts/update_supported_dockerfiles.py +++ b/scripts/update_supported_dockerfiles.py @@ -8,7 +8,7 @@ from typing import Dict, List import requests -from evergreen.release.agent_matrix import ( +from scripts.evergreen.release.agent_matrix import ( get_supported_version_for_image, ) from git import Repo @@ -42,7 +42,7 @@ def get_supported_variants_for_image(image: str) -> List[str]: return get_release()["supportedImages"][image]["variants"] -def get_supported_version(image: str) -> List[str]: +def get_supported_version_for_image_mck(image: str) -> List[str]: image = get_image_name(image) return get_supported_version_for_image(image) @@ -84,7 +84,7 @@ def save_supported_dockerfiles(): """ for image in SUPPORTED_IMAGES: print("Image:", image) - versions = get_supported_version(image) + versions = get_supported_version_for_image_mck(image) for version in versions: for variant in get_supported_variants_for_image(image): response = download_dockerfile_from_s3(image, version, variant) From 3b1312c50d1eb4bf24e4cd5e772df2ab4e0dd90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kara=C5=9B?= Date: Thu, 14 Aug 2025 16:42:14 +0200 Subject: [PATCH 4/4] Linter fixes --- scripts/update_supported_dockerfiles.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/update_supported_dockerfiles.py b/scripts/update_supported_dockerfiles.py index 3778bddad..4effd8f50 100755 --- a/scripts/update_supported_dockerfiles.py +++ b/scripts/update_supported_dockerfiles.py @@ -8,11 +8,12 @@ from typing import Dict, List import requests +from git import Repo +from requests import Response + from scripts.evergreen.release.agent_matrix import ( get_supported_version_for_image, ) -from git import Repo -from requests import Response def get_repo_root():