Files
team/server/build/Dockerfile.fips
Eva SarafianouandGitHub ab2aa18d04 Update vulnerable dependencies (#33793)
* Move from archiver to archives

* Bump chainguard runtime image
2025-08-25 17:35:15 +03:00

51 lines
1.7 KiB
Docker

FROM cgr.dev/mattermost.com/glibc-openssl-fips:15-dev@sha256:12a9f8e11e38031da79e6c76e882ac23b526e6151179124a93b7ff500158ff3f
# Setting bash as our shell, and enabling pipefail option
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Some ENV variables
ENV PATH="/mattermost/bin:${PATH}"
# Build Arguments
ARG PUID=2000
ARG PGID=2000
# MM_PACKAGE build arguments controls which version of mattermost to install, defaults to latest stable enterprise
# i.e. https://releases.mattermost.com/9.7.1/mattermost-9.7.1-linux-amd64.tar.gz
ARG MM_PACKAGE="https://latest.mattermost.com/mattermost-enterprise-linux"
# # Install needed packages and indirect dependencies
USER 0:0
RUN apk add \
curl \
ca-certificates \
mailcap \
unrtf \
wv \
poppler-utils \
tzdata
# Set mattermost group/user and download Mattermost
COPY $MM_PACKAGE /tmp/mattermost.tgz
RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \
&& addgroup -g ${PGID} mattermost \
&& adduser -D -u ${PUID} -G mattermost -g "" -s /bin/bash -h /mattermost mattermost \
&& tar -xvz -f /tmp/mattermost.tgz \
&& rm /tmp/mattermost.tgz \
&& chown -R mattermost:mattermost /mattermost /mattermost/data /mattermost/plugins /mattermost/client/plugins
# We should refrain from running as privileged user
USER mattermost
# Healthcheck to make sure container is ready
HEALTHCHECK --interval=30s --timeout=10s \
CMD curl -f http://localhost:8065/api/v4/system/ping || exit 1
# Configure entrypoint and command with proper permissions
ENTRYPOINT ["/mattermost/bin/mattermost"]
WORKDIR /mattermost
EXPOSE 8065 8067 8074 8075
# Declare volumes for mount point directories
VOLUME ["/mattermost/data", "/mattermost/logs", "/mattermost/config", "/mattermost/plugins", "/mattermost/client/plugins"]