-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
150 lines (144 loc) · 5.15 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
ARG DISTRO=alpine
ARG DISTRO_VARIANT=3.20-7.10.17
FROM docker.io/tiredofit/${DISTRO}:${DISTRO_VARIANT}
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
ARG SYNAPSE_VERSION
ARG PROVIDDER_LDAP_VERSION
ARG PROVIDER_REST_VERSION
ARG PROVIDER_S3_VERSION
ARG PROVIDER_SHARED_SECRET_VERSION
ENV SYNAPSE_VERSION=${SYNAPSE_VERSION:-"v1.119.0"} \
PROVIDER_LDAP_VERSION=${PROVIDER_LDAP_VERSION:-"v0.3.0"} \
PROVIDER_REST_VERSION=${PROVIDER_REST_VERSION:-"v0.1.4"} \
PROVIDER_S3_VERSION=${PROVIDER_S3_VERSION:-"v1.4.0"} \
PROVIDER_SHARED_SECRET_VERSION=${PROVIDER_SHARED_SECRET_VERSION:-"2.0.2"} \
SYNAPSE_REPO_URL=https://github.com/element-hq/synapse \
PROVIDER_LDAP_REPO_URL=https://github.com/matrix-org/matrix-synapse-ldap3 \
PROVIDER_REST_REPO_URL=https://github.com/ma1uta/matrix-synapse-rest-password-provider \
PROVIDER_S3_REPO_URL=https://github.com/ma1uta/matrix-synapse-s3-storage-provider \
PROVIDER_SHARED_SECRET_REPO_URL=https://github.com/devture/matrix-synapse-shared-secret-auth \
IMAGE_NAME="tiredofit/synapse" \
IMAGE_REPO_URL="https://github.com/tiredofit/synapse/"
RUN source assets/functions/00-container && \
set -x && \
addgroup -S -g 8008 synapse && \
adduser -D -S -s /sbin/nologin \
-h /dev/null \
-G synapse \
-g "synapse" \
-u 8008 synapse \
&& \
\
package update && \
package upgrade && \
package install .synapse-build-deps \
g++ \
icu-dev \
py3-gpep517 \
py3-installer \
py3-poetry-core \
py3-pip \
py3-setuptools-rust \
py3-wheel \
python3-dev \
libpq-dev \
&& \
\
package install .synapse-run-deps \
icu \
inotify-tools \
libpq \
postgresql16-client \
python3 \
py3-asn1 \
py3-asn1-modules \
py3-attrs \
py3-authlib \
py3-boto3 \
py3-botocore \
py3-bcrypt \
py3-bleach \
py3-canonicaljson \
py3-daemonize \
py3-eliot \
py3-frozendict \
py3-humanize \
py3-idna \
py3-ijson \
py3-jinja2 \
py3-jsonschema \
py3-jwt \
py3-ldap3 \
py3-lxml \
py3-matrix-common \
py3-msgpack \
py3-netaddr \
py3-openssl \
py3-phonenumbers \
py3-pillow \
py3-prometheus-client \
py3-psycopg2 \
py3-pydantic \
py3-pymacaroons \
py3-pynacl \
py3-saml2 \
py3-service_identity \
py3-signedjson \
py3-sortedcontainers \
py3-treq \
py3-tqdm \
py3-twisted \
py3-txacme \
py3-txredisapi \
py3-typing-extensions \
py3-yaml \
sed \
sqlite \
&& \
\
pip install --upgrade --force --break-system-packages "pyicu" && \
clone_git_repo "${SYNAPSE_REPO_URL}" "${SYNAPSE_VERSION}" && \
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 1 \
&& \
pip install --break-system-packages --upgrade dist/*.whl && \
mkdir -p \
/assets/synapse \
/var/run/synapse \
&& \
cp -R build/lib*/synapse/res/* /assets/synapse && \
\
chown -R synapse:synapse \
/assets/synapse \
/var/run/synapse \
&& \
\
clone_git_repo "${PROVIDER_LDAP_REPO_URL}" "${PROVIDER_LDAP_VERSION}" && \
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 1 \
&& \
pip install --break-system-packages --upgrade dist/*.whl && \
\
clone_git_repo "${PROVIDER_REST_REPO_URL}" "${PROVIDER_REST_VERSION}" && \
cp rest_auth_provider.py /usr/lib/python*/site-packages && \
\
clone_git_repo "${PROVIDER_S3_REPO_URL}" "${PROVIDER_S3_VERSION}" && \
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 1 \
&& \
pip install --break-system-packages --upgrade dist/*.whl && \
\
clone_git_repo "${PROVIDER_SHARED_SECRET_REPO_URL}" "${PROVIDER_SHARED_SECRET_VERSION}" && \
cp -R shared_secret_authenticator.py /usr/lib/python*/ && \
\
package remove .synapse-build-deps && \
package cleanup && \
\
rm -rf /root/.cargo \
/.cache \
/usr/src/*
EXPOSE 8008
COPY install /