From 1dea5aaeaf7c29c5222feabd7503e7af2322e23d Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 22 Nov 2017 12:28:17 +0100 Subject: [PATCH] Up --- Dockerfile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2756c65..6cbd9d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,31 @@ -FROM mattermost/mattermost-prod-app +FROM ubuntu:16.04 MAINTAINER Glenn Y. Rolland +# Some ENV variables +ENV PATH="/mattermost/bin:${PATH}" +ENV MM_VERSION=4.4.1 + +# 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 \ + && curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; \ + && 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/bin +CMD ["platform"] + +# Expose port 80 of the container +EXPOSE 80 + +# Use a volume for the data directory +VOLUME /mattermost/data