matrix-synapse/Dockerfile
2021-11-24 09:14:26 +00:00

40 lines
871 B
Docker

FROM alpine:3.14 AS builder
ENV VERSION=v1.47.1
RUN apk add --no-cache \
alpine-sdk \
python3-dev \
py3-pip \
libffi-dev \
openssl-dev \
zlib-dev \
jpeg-dev \
cargo
RUN pip3 install --target="/install" matrix-synapse==$VERSION
FROM thallian/confd-env:latest
RUN addgroup -g 2222 matrix-synapse
RUN adduser -h /var/lib/matrix-synapse -u 2222 -D -G matrix-synapse matrix-synapse
RUN apk add --no-cache \
python3 \
py3-psycopg2 \
py3-authlib \
libffi \
openssl \
zlib \
jpeg
ENV PYTHONPATH=$PYTHONPATH:/py-pkgs
COPY --from=builder /install /py-pkgs
ADD /rootfs /
RUN chown -R matrix-synapse:matrix-synapse /var/lib/matrix-synapse
ENV HOME /var/lib/matrix-synapse
VOLUME /var/lib/matrix-synapse/media_store/ /var/lib/matrix-synapse/signing/ /etc/ssl/matrix-synapse/ /var/lib/matrix-synapse/registrations/