UNCLASSIFIED

Commit 927daebc authored by jonathan.janos@mongodb.com's avatar jonathan.janos@mongodb.com
Browse files

Replace Dockerfile

parent c1935409
Pipeline #188422 passed with stages
in 13 minutes and 52 seconds
......@@ -4,18 +4,15 @@
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=redhat/ubi/ubi8
ARG BASE_TAG=8.3
FROM quay.io/mongodb/mongodb-enterprise-database-ubi:1.5.3 as official
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ENV MMS_HOME /mongodb-automation
ENV MMS_LOG_DIR /var/log/mongodb-mms-automation
LABEL name="MongoDB Enterprise Database" \
version="1.5.3" \
summary="MongoDB Enterprise Database Image" \
description="MongoDB Enterprise Database Image" \
vendor="MongoDB" \
release="1" \
maintainer="support@mongodb.com"
COPY LICENSE /licenses/mongodb-enterprise-database
RUN yum update -y && rm -rf /var/cache/yum \
# these are the packages needed for the agent
&& yum install -y --disableplugin=subscription-manager \
......@@ -39,8 +36,10 @@ RUN yum update -y && rm -rf /var/cache/yum \
# mongodb enterprise expects this library /usr/lib64/libsasl2.so.2 but
# cyrus-sasl creates it in /usr/lib64/libsasl2.so.3 instead
&& ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
# Copy all the required scripts from the official database image
COPY --from=official "${MMS_HOME}" ${MMS_HOME}/
# Set the required perms
RUN mkdir -p "${MMS_LOG_DIR}" \
&& chmod 0775 "${MMS_LOG_DIR}" \
......@@ -52,11 +51,14 @@ RUN mkdir -p "${MMS_LOG_DIR}" \
&& 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
ENTRYPOINT ["/mongodb-automation/files/agent-launcher.sh"]
HEALTHCHECK --timeout=30s CMD ls "${MMS_HOME}"/files/probe.sh || exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment