Dockerfile 1.3 KB

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