Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM alpine:3.15
  2. ARG TARGETARCH=amd64
  3. RUN apk add --no-cache \
  4. python3 py3-pip py3-setuptools py3-wheel \
  5. py3-virtualenv \
  6. py3-pillow \
  7. py3-aiohttp \
  8. py3-magic \
  9. py3-ruamel.yaml \
  10. py3-commonmark \
  11. py3-qrcode \
  12. py3-phonenumbers \
  13. py3-prometheus-client \
  14. # Other dependencies
  15. ffmpeg \
  16. py3-cryptography \
  17. py3-protobuf \
  18. py3-sniffio \
  19. py3-rfc3986 \
  20. py3-idna \
  21. py3-h11 \
  22. ca-certificates \
  23. su-exec \
  24. # encryption
  25. py3-olm \
  26. py3-cffi \
  27. py3-pycryptodome \
  28. py3-unpaddedbase64 \
  29. py3-future \
  30. bash \
  31. curl \
  32. jq \
  33. yq
  34. COPY requirements.txt /opt/mautrix-signal/requirements.txt
  35. COPY optional-requirements.txt /opt/mautrix-signal/optional-requirements.txt
  36. WORKDIR /opt/mautrix-signal
  37. RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
  38. && pip3 install -r requirements.txt -r optional-requirements.txt \
  39. && apk del .build-deps
  40. COPY . /opt/mautrix-signal
  41. RUN apk add git && pip3 install .[all] && apk del git \
  42. # This doesn't make the image smaller, but it's needed so that the `version` command works properly
  43. && cp mautrix_signal/example-config.yaml . && rm -rf mautrix_signal
  44. VOLUME /data
  45. ENV UID=1337 GID=1337
  46. CMD ["/opt/mautrix-signal/docker-run.sh"]