-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (30 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
32 lines (30 loc) · 1.01 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
FROM python:3.11-slim AS osdeps
# Install OS-level packages
# FIXME: Are vim, jq and netcat *really* needed for production ? Add a separate devel/debug target
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
gettext \
openssl \
tini \
vim \
jq \
netcat-openbsd \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o /usr/bin/wait-for-it.sh \
&& chmod a+x /usr/bin/wait-for-it.sh \
&& true
# Install synapse and scripts
FROM osdeps AS install
# Install python packages
COPY ./requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt
WORKDIR /opt/synapse
COPY scripts ./scripts
COPY templates ./templates
RUN chmod +x /opt/synapse/scripts/*.sh
# FIXME: We really should not be running synapse as root
FROM install AS run
WORKDIR /opt/synapse
ENTRYPOINT ["/usr/bin/tini", "--", "/opt/synapse/scripts/synapse-entrypoint.sh"]