matrix-synapse/Dockerfile

48 lines
1016 B
Docker

FROM alpine:3.13 AS builder
ENV VERSION=v1.27.0
RUN apk add --no-cache \
alpine-sdk \
python3-dev \
py3-pip \
libffi-dev \
openssl-dev \
zlib-dev \
jpeg-dev \
rust
RUN pip3 install wheel
RUN pip3 wheel 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-pip \
py3-psycopg2 \
py3-jinja2 \
libffi \
openssl \
zlib \
jpeg
RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community add \
py3-authlib
RUN mkdir /tmp/wheels
COPY --from=builder /*.whl /tmp/wheels/
RUN pip3 install /tmp/wheels/*.whl
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/