diff --git a/Dockerfile b/Dockerfile index cf8d84d..b97851f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,21 +2,10 @@ FROM alpine:3.8 AS builder RUN apk add --no-cache \ alpine-sdk \ - py3-crypto \ - py3-zope-interface \ - python3-dev \ - py3-setuptools \ - libtirpc-dev + python3-dev -RUN adduser -h /var/lib/builder -u 2222 -D -G abuild builder - -COPY APKBUILD /var/lib/builder/APKBUILD - -WORKDIR /var/lib/builder/ -USER builder - -RUN abuild-keygen -a -n -RUN abuild -r +RUN pip3 install wheel +RUN pip3 wheel twisted FROM thallian/confd-env:latest @@ -53,9 +42,10 @@ RUN apk add --no-cache \ py3-dateutil \ py3-ldap3 -COPY --from=builder /var/lib/builder/packages/lib/x86_64/py3-twisted-17.1.0-r0.apk /tmp/py3-twisted.apk -RUN apk --allow-untrusted add /tmp/py3-twisted.apk +RUN mkdir /tmp/wheels +COPY --from=builder /Twisted*.whl /tmp/wheels +RUN pip3 install /tmp/wheels/*.whl RUN pip3 install https://github.com/matrix-org/synapse/tarball/$VERSION ADD /rootfs / diff --git a/rootfs/etc/services.d/synapse/run b/rootfs/etc/services.d/synapse/run index f63079a..8988858 100644 --- a/rootfs/etc/services.d/synapse/run +++ b/rootfs/etc/services.d/synapse/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv sh cd /var/lib/matrix-synapse -s6-setuidgid matrix-synapse python -B -m synapse.app.homeserver -c server.yaml +s6-setuidgid matrix-synapse python3 -B -m synapse.app.homeserver -c server.yaml