Dockerfile 1.2 KB

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