Update dockerfile

This commit is contained in:
Tulir Asokan 2022-02-21 00:31:50 +02:00
parent d12ff25f13
commit 5e5f62467b

View File

@ -2,7 +2,6 @@ ARG PYTHON_VERSION=3.9
FROM docker.io/python:${PYTHON_VERSION}-slim as builder
# install the OS build deps
RUN apt-get update && apt-get install -y \
build-essential \
libffi-dev \
@ -17,22 +16,6 @@ RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Build dependencies that are not available as wheels, to speed up rebuilds
RUN pip install --prefix="/install" --no-warn-script-location \
"frozendict<2.1.2" \
jaeger-client \
opentracing \
# Match the version constraints of Synapse
"prometheus_client>=0.4.0,<0.13.0" \
psycopg2 \
pycparser \
pyrsistent \
pyyaml \
simplejson \
threadloop \
thrift
# now install synapse and all of the python deps to /install.
COPY synapse /synapse/synapse/
COPY scripts /synapse/scripts/
COPY MANIFEST.in README.rst setup.py synctl /synapse/
@ -40,13 +23,12 @@ COPY MANIFEST.in README.rst setup.py synctl /synapse/
RUN pip install --prefix="/install" --no-warn-script-location \
/synapse[all] \
'git+https://github.com/maunium/synapse-simple-antispam#egg=synapse-simple-antispam' \
'git+https://github.com/devture/matrix-synapse-shared-secret-auth@e178353ec87c56e0169dd04466d4769da5ed9c46#egg=shared_secret_authenticator'
'git+https://github.com/devture/matrix-synapse-shared-secret-auth@v2.0.2#egg=shared_secret_authenticator'
FROM docker.io/python:${PYTHON_VERSION}-slim
RUN apt-get update && apt-get install -y \
curl \
gosu \
libjpeg62-turbo \
libpq5 \
libwebp6 \
@ -63,5 +45,5 @@ ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
ENTRYPOINT ["python3", "-m", "synapse.app.homeserver"]
CMD ["--keys-directory", "/data", "-c", "/data/homeserver.yaml"]
HEALTHCHECK --interval=1m --timeout=5s \
HEALTHCHECK --start-period=5s --interval=1m --timeout=5s \
CMD curl -fSs http://localhost:8008/health || exit 1