matrix-synapse/Containerfile
Sebastian Hugentobler 92139571e8
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Failing after 3h9m12s
push to 1.105.1
2024-04-23 19:10:58 +02:00

50 lines
1.1 KiB
Docker

FROM docker.io/alpine:3.19 AS builder
RUN apk add --no-cache \
alpine-sdk \
python3-dev \
py3-pip \
py3-wheel \
libffi-dev \
openssl-dev \
zlib-dev \
jpeg-dev \
rust \
cargo \
poetry \
git
ENV VERSION=v1.105.1
RUN git clone https://github.com/element-hq/synapse.git
WORKDIR /synapse
RUN git checkout $VERSION
RUN poetry export -o /synapse/requirements.txt
RUN pip3 install --target="/install" -r /synapse/requirements.txt
RUN pip3 install --target="/install" --no-deps --no-warn-script-location /synapse[all];
FROM docker.io/thallian/confd-env:3.19-3.1.6.2
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/