FROM alpine:3.8 AS builder RUN apk add --no-cache \ alpine-sdk \ py3-crypto \ py3-zope-interface \ python3-dev \ py3-setuptools \ libtirpc-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 FROM thallian/confd-env:latest ENV VERSION v0.34.0 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 \ libressl \ python3 \ py3-jsonschema \ py3-pynacl \ py3-cffi \ py3-service_identity \ py3-openssl \ py3-yaml \ py3-asn1 \ py3-asn1-modules \ py3-bcrypt \ py3-pillow \ py3-psutil \ py3-msgpack \ py3-phonenumbers \ py3-attrs \ py3-netaddr \ py3-jinja2 \ py3-psycopg2 \ py3-simplejson \ py3-zope-interface \ py3-requests \ py3-defusedxml \ py3-future \ 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 pip3 install https://github.com/matrix-org/synapse/tarball/$VERSION ADD /rootfs / RUN chown -R matrix-synapse:matrix-synapse /var/lib/matrix-synapse ENV HOME /var/lib/matrix-synapse EXPOSE 8448 VOLUME /var/lib/matrix-synapse/media_store/ /var/lib/matrix-synapse/uploads /var/lib/matrix-synapse/signing/ /etc/ssl/matrix-synapse/ /var/lib/matrix-synapse/registrations/