Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. FROM docker.io/alpine:3.18
  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. # Temporarily install pillow from edge repo to get up-to-date version
  29. && apk add --no-cache py3-pillow --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
  30. COPY requirements.txt /opt/mautrix-instagram/requirements.txt
  31. COPY optional-requirements.txt /opt/mautrix-instagram/optional-requirements.txt
  32. WORKDIR /opt/mautrix-instagram
  33. RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
  34. && pip3 install --no-cache-dir -r requirements.txt -r optional-requirements.txt \
  35. && apk del .build-deps
  36. COPY . /opt/mautrix-instagram
  37. RUN apk add git && pip3 install --no-cache-dir .[all] && apk del git \
  38. # This doesn't make the image smaller, but it's needed so that the `version` command works properly
  39. && cp mautrix_instagram/example-config.yaml . && rm -rf mautrix_instagram .git build
  40. ENV UID=1337 GID=1337
  41. VOLUME /data
  42. CMD ["/opt/mautrix-instagram/docker-run.sh"]