diff --git a/Dockerfile b/Dockerfile index 6249f8d..fe1bd54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,7 @@ RUN apk add --no-cache \ jpeg-dev \ cargo -RUN pip3 install wheel -RUN pip3 wheel matrix-synapse==$VERSION +RUN pip3 install --target="/install" matrix-synapse==$VERSION FROM thallian/confd-env:latest @@ -23,19 +22,16 @@ RUN adduser -h /var/lib/matrix-synapse -u 2222 -D -G matrix-synapse matrix-synap RUN apk add --no-cache \ python3 \ py3-pip \ - py3-psycopg2 \ - py3-jinja2 \ - py3-authlib \ + #py3-psycopg2 \ + #py3-jinja2 \ + #py3-authlib \ libffi \ openssl \ zlib \ jpeg - -RUN mkdir /tmp/wheels -COPY --from=builder /*.whl /tmp/wheels/ - -RUN pip3 install /tmp/wheels/*.whl +ENV PYTHONPATH=$PYTHONPATH:/py-pkgs +COPY --from=builder /install /py-pkgs ADD /rootfs / diff --git a/rootfs/etc/cont-init.d/synapse-keys b/rootfs/etc/cont-init.d/synapse-keys index b835538..75d6291 100644 --- a/rootfs/etc/cont-init.d/synapse-keys +++ b/rootfs/etc/cont-init.d/synapse-keys @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv sh if [ ! -f /var/lib/matrix-synapse/signing/signing.key ]; then - s6-setuidgid matrix-synapse python -B -m synapse.app.homeserver -c /var/lib/matrix-synapse/server.yaml --generate-config -H $SERVER_NAME --report-stats=no + s6-setuidgid matrix-synapse python3 -B -m synapse.app.homeserver -c /var/lib/matrix-synapse/server.yaml --generate-config -H $SERVER_NAME --report-stats=no fi diff --git a/rootfs/usr/lib/python3.8/site-packages/nextcloud_oicd_mapping_provider.py b/rootfs/python-pkgs/nextcloud_oicd_mapping_provider.py similarity index 100% rename from rootfs/usr/lib/python3.8/site-packages/nextcloud_oicd_mapping_provider.py rename to rootfs/python-pkgs/nextcloud_oicd_mapping_provider.py