Dockerfile 1.2 KB

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