github.com/adacta-ru/mattermost-server/v5@v5.31.1/build/Dockerfile (about) 1 FROM alpine:3.12 2 3 # Some ENV variables 4 ENV PATH="/mattermost/bin:${PATH}" 5 ARG PUID=2000 6 ARG PGID=2000 7 ARG MM_PACKAGE="https://releases.mattermost.com/5.29.1/mattermost-5.29.1-linux-amd64.tar.gz?src=docker" 8 9 10 # Install some needed packages 11 RUN apk add --no-cache \ 12 ca-certificates \ 13 curl \ 14 libc6-compat \ 15 libffi-dev \ 16 linux-headers \ 17 mailcap \ 18 netcat-openbsd \ 19 xmlsec-dev \ 20 tzdata \ 21 && rm -rf /tmp/* 22 23 # Get Mattermost 24 RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \ 25 && if [ ! -z "$MM_PACKAGE" ]; then curl $MM_PACKAGE | tar -xvz ; \ 26 else echo "please set the MM_PACKAGE" ; fi \ 27 && addgroup -g ${PGID} mattermost \ 28 && adduser -D -u ${PUID} -G mattermost -h /mattermost -D mattermost \ 29 && chown -R mattermost:mattermost /mattermost /mattermost/plugins /mattermost/client/plugins 30 31 USER mattermost 32 33 #Healthcheck to make sure container is ready 34 HEALTHCHECK --interval=30s --timeout=10s \ 35 CMD curl -f http://localhost:8065/api/v4/system/ping || exit 1 36 37 38 # Configure entrypoint and command 39 COPY entrypoint.sh / 40 ENTRYPOINT ["/entrypoint.sh"] 41 WORKDIR /mattermost 42 CMD ["mattermost"] 43 44 EXPOSE 8065 8067 8074 8075 45 46 # Declare volumes for mount point directories 47 VOLUME ["/mattermost/data", "/mattermost/logs", "/mattermost/config", "/mattermost/plugins", "/mattermost/client/plugins"]