Sign inSign up

karoid/mattermost-team-edition

By karoid

•Updated 7 months ago

mattermost team edition with arm64

Image
Integration & delivery
0

678

karoid/mattermost-team-edition repository overview

built with next Dockerfile

FROM ubuntu:noble

# Setting bash as our shell, and enabling pipefail option
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Some ENV variables
ENV PATH="/mattermost/bin:${PATH}"
ARG VERSION=10.1.3
ARG PUID=2000
ARG PGID=2000
ARG TARGETARCH
ARG MM_PACKAGE="https://releases.mattermost.com/${VERSION}/mattermost-${VERSION}-linux-${TARGETARCH}.tar.gz?src=docker"

# # Install needed packages and indirect dependencies
RUN apt-get update \
  && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
  ca-certificates \
  curl \
  media-types \
  mailcap \
  unrtf \
  wv \
  poppler-utils \
  tidy \
  tzdata \
  && rm -rf /var/lib/apt/lists/*

# Set mattermost group/user and download Mattermost
RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \
  && groupadd --gid ${PGID} mattermost \
  && useradd --uid ${PUID} --gid ${PGID} --comment "" --home-dir /mattermost mattermost \
  && if [ -n "$MM_PACKAGE" ]; then \
    # 임시 파일로 다운로드 
    TEMP_FILE=$(mktemp) \
    && curl -L -o ${TEMP_FILE} $MM_PACKAGE \
    # 파일 형식 확인 (gzip 여부)
    && if file ${TEMP_FILE} | grep -q "gzip"; then \
      # gzip 형식이면 -z 옵션 사용
      tar -xzvf ${TEMP_FILE}; \
    else \
      # 일반 tar 파일이면 -z 옵션 없이 압축 해제
      tar -xvf ${TEMP_FILE}; \
    fi \
    && rm ${TEMP_FILE}; \
  else echo "please set the MM_PACKAGE" ; exit 127 ; fi \
  && 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
COPY --chown=mattermost:mattermost --chmod=765 ./entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /mattermost
CMD ["mattermost"]

EXPOSE 8065 8067 8074 8075

# Declare volumes for mount point directories
VOLUME ["/mattermost/data", "/mattermost/logs", "/mattermost/config", "/mattermost/plugins", "/mattermost/client/plugins"]

Tag summary

Content type

Image

Digest

sha256:7a67d61a5…

Size

616.1 MB

Last updated

7 months ago

docker pull karoid/mattermost-team-edition