This repository has been archived on 2021-08-31. You can view files and clone it, but cannot push or open issues or pull requests.
mattermost/app/Dockerfile
Veovis dfe76684f4 Change the working dir for plugins to work (#218)
Fix https://github.com/mattermost/mattermost-docker/issues/217 with the default configuration on the PluginSettings as they use relative paths.
2018-01-01 17:58:08 +01:00

37 lines
1.1 KiB
Docker

FROM ubuntu:16.04
# Some ENV variables
ENV PATH="/mattermost/bin:${PATH}"
ENV MM_VERSION=4.5.0
# Build argument to set Mattermost edition
ARG edition=enterprise
# Install some needed packages
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
curl \
jq \
netcat \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
# Get Mattermost
RUN mkdir -p /mattermost/data \
&& if [ "$edition" = "team" ] ; then curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; \
else curl https://releases.mattermost.com/$MM_VERSION/mattermost-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; fi \
&& cp /mattermost/config/config.json /config.json.save \
&& rm -rf /mattermost/config/config.json
# Configure entrypoint and command
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /mattermost
CMD ["platform"]
# Expose port 80 of the container
EXPOSE 80
# Use a volume for the data directory
VOLUME /mattermost/data