forked from lazyfrosch/docker-mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM debian:jessie
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y libmozjs-24-bin libjson-perl curl wget \
&& rm -rf /var/lib/apt/lists/*
# we need jsawk to fiddle with the config file
RUN curl -Ls https://github.com/micha/jsawk/raw/5a14c4af3c7b59807701b70a954ecefc6f77e978/jsawk >/usr/local/bin/jsawk \
&& curl -Ls https://raw.githubusercontent.com/micha/resty/4d1b8bed5a9dd5173668e670c759dea25647a896/pp >/usr/local/bin/pp \
&& chmod +x /usr/local/bin/jsawk /usr/local/bin/pp \
&& sed -i 's#JSBIN=.*#JSBIN=/usr/bin/js24#' /usr/local/bin/jsawk \
&& ( echo '{}' | jsawk 'this.test = true;' | grep 'test' ) \
&& ( echo '{"test": 1}' | pp )
WORKDIR /mattermost
VOLUME /data
RUN wget https://github.com/mattermost/platform/releases/download/v0.7.1/mattermost.tar.gz -O /tmp/mattermost.tar.gz \
&& cd /mattermost \
&& tar -zxvf /tmp/mattermost.tar.gz --strip-components=1 \
&& rm /tmp/mattermost.tar.gz
RUN adduser --home /mattermost --no-create-home --ingroup daemon --shell /bin/false --system mattermost
RUN rm -rf /mattermost/logs \
&& ln -svf /data/logs /mattermost/logs
ADD config.default.json /mattermost/
ADD entrypoint.sh /
ADD mattermost /usr/local/bin/
ENTRYPOINT ["/entrypoint.sh"]
CMD ["mattermost"]
EXPOSE 8080