matrix-bridge-telegram/Dockerfile

98 lines
2.0 KiB
Docker
Raw Normal View History

2020-07-26 08:48:31 +00:00
FROM alpine:3.12 as builder
2018-11-28 13:34:46 +00:00
2020-12-10 08:16:55 +00:00
ENV VERSION=v0.9.0
2018-11-28 15:13:57 +00:00
2018-11-28 13:34:46 +00:00
RUN apk --no-cache add \
gcc \
2020-07-08 18:16:01 +00:00
g++ \
2018-11-28 13:34:46 +00:00
musl-dev \
python3-dev \
zlib-dev \
jpeg-dev \
2019-06-20 08:40:54 +00:00
libffi-dev \
2020-07-08 18:12:25 +00:00
postgresql-dev \
2020-07-26 09:39:57 +00:00
py3-pip \
2018-11-28 13:34:46 +00:00
py3-aiohttp \
py3-sqlalchemy \
py3-magic \
py3-lxml \
py3-attrs \
py3-chardet \
py3-multidict \
py3-yarl \
py3-idna-ssl \
py3-mako \
py3-dateutil \
py3-future \
py3-async-timeout \
py3-rsa \
py3-decorator \
py3-idna \
py3-markupsafe \
py3-six \
py3-asn1 \
2018-11-28 14:16:46 +00:00
py3-numpy \
2020-07-26 10:20:35 +00:00
py3-psycopg2 \
2020-07-26 12:11:29 +00:00
py3-wheel \
2020-07-08 18:28:41 +00:00
olm-dev
2018-11-28 15:13:57 +00:00
RUN mkdir /tmp/mautrix-telegram
RUN wget -qO- https://github.com/tulir/mautrix-telegram/archive/$VERSION.tar.gz | tar -xz --strip 1 -C /tmp/mautrix-telegram
2018-11-28 15:33:32 +00:00
RUN cd /tmp/mautrix-telegram && pip3 install -r requirements.txt -r optional-requirements.txt && pip3 install .
2018-11-28 13:34:46 +00:00
FROM thallian/confd-env:latest
2018-11-28 15:13:57 +00:00
ENV FFMPEG_BINARY=/usr/bin/ffmpeg
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
2019-12-20 10:11:23 +00:00
COPY --from=builder /usr/lib/python3.8/site-packages /usr/lib/python3.8/site-packages
2018-11-28 14:47:33 +00:00
COPY --from=builder /usr/bin/alembic /usr/bin/alembic
2018-11-28 15:13:57 +00:00
COPY --from=builder /tmp/mautrix-telegram/alembic /var/lib/matrix-bridge/alembic
COPY --from=builder /tmp/mautrix-telegram/alembic.ini /var/lib/matrix-bridge/alembic.ini
2018-11-28 14:37:38 +00:00
2018-11-28 13:34:46 +00:00
RUN apk --no-cache add \
ca-certificates \
python3 \
ffmpeg \
libmagic \
zlib \
jpeg \
2019-06-20 08:40:54 +00:00
libffi \
2020-07-08 18:12:25 +00:00
postgresql-dev \
py3-aiohttp \
py3-sqlalchemy \
py3-magic \
py3-lxml \
py3-attrs \
py3-chardet \
py3-multidict \
py3-yarl \
py3-idna-ssl \
py3-mako \
py3-dateutil \
py3-future \
py3-async-timeout \
py3-rsa \
py3-decorator \
py3-idna \
py3-markupsafe \
py3-six \
py3-asn1 \
py3-numpy \
2020-07-26 12:11:29 +00:00
py3-psycopg2 \
2020-07-08 18:28:41 +00:00
olm
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