Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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-prometheus-client \
  10. py3-paho-mqtt \
  11. # proxy support
  12. py3-aiohttp-socks \
  13. py3-pysocks \
  14. # Other dependencies
  15. ca-certificates \
  16. su-exec \
  17. ffmpeg \
  18. # encryption
  19. py3-olm \
  20. py3-cffi \
  21. py3-pycryptodome \
  22. py3-unpaddedbase64 \
  23. py3-future \
  24. bash \
  25. curl \
  26. jq \
  27. yq
  28. COPY requirements.txt /opt/mautrix-instagram/requirements.txt
  29. COPY optional-requirements.txt /opt/mautrix-instagram/optional-requirements.txt
  30. WORKDIR /opt/mautrix-instagram
  31. RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
  32. && pip3 install --no-cache-dir -r requirements.txt -r optional-requirements.txt \
  33. && apk del .build-deps
  34. COPY . /opt/mautrix-instagram
  35. RUN apk add git && pip3 install --no-cache-dir .[all] && apk del git \
  36. # This doesn't make the image smaller, but it's needed so that the `version` command works properly
  37. && cp mautrix_instagram/example-config.yaml . && rm -rf mautrix_instagram .git build
  38. ENV UID=1337 GID=1337
  39. VOLUME /data
  40. CMD ["/opt/mautrix-instagram/docker-run.sh"]