forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (46 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
57 lines (46 loc) · 1.33 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu as build
# Setting bash as our shell, and enabling pipefail option
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Some ENV variables
ENV PATH="/usr/lib/go/bin:/mattermost/server/bin:${PATH}"
# Build Arguments
ARG PUID=2000
ARG PGID=2000
# 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 \
make \
build-essential \
gcc \
golang \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Build client
RUN mkdir /mattermost
COPY . /mattermost
WORKDIR /mattermost/webapp
RUN make dist
# Build server
WORKDIR /mattermost/server
RUN make client \
&& make build-linux
# Healthcheck to make sure container is ready
HEALTHCHECK --interval=30s --timeout=10s \
CMD curl -f http://localhost:8065/api/v4/system/ping || exit 1
# Required ports
EXPOSE 8065 8067 8074 8075
# Declare volumes for mount point directories
VOLUME ["/mattermost/server/data", "/mattermost/server/logs", "/mattermost/server/config", "/mattermost/server/plugins", "/mattermost/server/client/plugins"]
# run the client and server
CMD ["mattermost"]