-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
46 lines (34 loc) · 1.05 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
37
38
39
40
41
42
43
44
45
46
FROM python:3-alpine
WORKDIR /app
COPY requirements.txt ./
# build dependencies
RUN set -x \
&& apk add --no-cache --virtual .build-deps gcc musl-dev libffi-dev olm-dev \
&& pip install --no-cache-dir -r requirements.txt \
&& apk del .build-deps
# runtime dependeincies
RUN set -x \
&& apk add --no-cache olm
EXPOSE 8000
ENV PYTHONUNBUFFERED=1
ENV LOGIN_STORE_PATH=/config
ENV MESSAGE_FORMAT=yaml
ENV USE_MARKDOWN=False
ENV ALLOW_UNICODE=True
ENV DISPLAY_APP_NAME=True
ENV MATRIX_SERVER=https://matrix.example.org
ENV MATRIX_SSLVERIFY=True
ENV MATRIX_USERID=@myhook:matrix.example.org
ENV MATRIX_PASSWORD=mypassword
ENV MATRIX_DEVICE=any-device-name
ENV MATRIX_ADMIN_ROOM=!myroomid:matrix.example.org
ENV KNOWN_TOKENS=
# run as a non-root user, @see: https://busybox.net/downloads/BusyBox.html#adduser
RUN set -x \
&& adduser -D -H -g '' -u 1000 matrix \
&& mkdir -p "${LOGIN_STORE_PATH}" \
&& chown -R matrix. "${LOGIN_STORE_PATH}"
COPY docker-entrypoint.sh ./
ENTRYPOINT [ "./docker-entrypoint.sh" ]
COPY src/ ./src/
USER matrix