Dockerfile 1.3 KB

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