build twisted as a wheel

This commit is contained in:
Sebastian Hugentobler 2019-01-01 16:19:38 +01:00
parent fec4374c81
commit 4f97fde073
2 changed files with 7 additions and 17 deletions

View File

@ -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 /

View File

@ -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