matrix-bridge-telegram/Dockerfile

106 lines
2.0 KiB
Docker
Raw Normal View History

2022-07-12 17:34:27 +00:00
FROM docker.io/alpine:3.16 as builder
2018-11-28 13:34:46 +00:00
2022-08-18 08:16:00 +00:00
ENV VERSION=e3a067c27aa3d9dd5e82db307218cc66c8356ddd
2018-11-28 15:13:57 +00:00
2018-11-28 13:34:46 +00:00
RUN apk --no-cache add \
2022-03-28 08:06:06 +00:00
sed \
2018-11-28 13:34:46 +00:00
gcc \
2022-03-28 08:06:06 +00:00
g++ \
git \
musl-dev \
libffi-dev \
python3-dev \
2022-08-18 08:16:00 +00:00
rust \
cargo \
2020-07-26 09:39:57 +00:00
py3-pip \
2022-03-28 08:06:06 +00:00
py3-wheel \
py3-brotli \
py3-olm \
py3-qrcode \
py3-pillow \
py3-phonenumbers \
py3-unpaddedbase64 \
py3-pycryptodome \
py3-pyaes \
py3-rsa \
py3-cparser \
py3-cffi \
py3-decorator \
py3-tqdm \
py3-numpy \
py3-future \
py3-asn1 \
py3-ruamel.yaml \
py3-magic \
py3-commonmark \
py3-aiohttp \
py3-yarl \
py3-mako \
py3-setuptools
2022-07-22 14:36:29 +00:00
#RUN git clone -b v0.25.0 --recursive https://github.com/MagicStack/asyncpg.git
#WORKDIR /asyncpg
#RUN sed -ie '1,3d' pyproject.toml
#RUN python3 setup.py install --prefix=/install
#RUN pip3 install --prefix=/install mautrix-telegram[all]==$VERSION
RUN git clone https://github.com/mautrix/telegram.git
WORKDIR /telegram
RUN git checkout "$VERSION"
RUN pip3 install --prefix=/install --upgrade -r requirements.txt
2022-08-18 08:16:00 +00:00
RUN pip3 install --prefix=/install --upgrade -r optional-requirements.txt
2022-07-22 14:36:29 +00:00
RUN cp -r mautrix_telegram /install/lib/python3.10/site-packages/
2022-03-28 08:06:06 +00:00
2018-11-28 13:34:46 +00:00
2022-07-12 17:34:27 +00:00
FROM docker.io/thallian/confd-env:3.16
2018-11-28 13:34:46 +00:00
2018-11-28 15:13:57 +00:00
ENV FFMPEG_BINARY=/usr/bin/ffmpeg
2022-03-28 08:06:06 +00:00
COPY --from=builder /install /py-pkgs
2018-11-28 13:34:46 +00:00
RUN addgroup -g 2222 matrix-bridge
RUN adduser -h /var/lib/matrix-bridge -u 2222 -D -G matrix-bridge matrix-bridge
RUN apk --no-cache add \
ca-certificates \
ffmpeg \
2019-06-20 08:40:54 +00:00
libffi \
2022-03-28 08:06:06 +00:00
python3 \
py3-brotli \
py3-olm \
py3-qrcode \
py3-pillow \
py3-phonenumbers \
py3-unpaddedbase64 \
py3-pycryptodome \
py3-pyaes \
py3-rsa \
py3-cparser \
py3-cffi \
py3-decorator \
py3-tqdm \
py3-numpy \
py3-future \
py3-asn1 \
py3-ruamel.yaml \
py3-magic \
py3-commonmark \
py3-aiohttp \
py3-yarl \
py3-mako \
py3-setuptools
2022-07-12 17:34:27 +00:00
ENV PYTHONPATH=/usr/lib/python3.10/site-packages:/py-pkgs/lib/python3.10/site-packages/
2020-07-08 18:28:41 +00:00
2018-11-28 13:34:46 +00:00
WORKDIR /var/lib/matrix-bridge
RUN mkdir /var/lib/matrix-bridge/data
ADD /rootfs /
RUN chown -R matrix-bridge:matrix-bridge /var/lib/matrix-bridge
ENV HOME /var/lib/matrix-bridge
EXPOSE 8080