Remove everything and add stub Go module
This commit is contained in:
+15
-53
@@ -1,59 +1,21 @@
|
||||
FROM dock.mau.dev/tulir/lottieconverter:alpine-3.19
|
||||
FROM golang:1-alpine3.19 AS builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
python3 py3-pip py3-setuptools py3-wheel \
|
||||
py3-pillow \
|
||||
py3-aiohttp \
|
||||
py3-asyncpg \
|
||||
py3-aiosqlite \
|
||||
py3-magic \
|
||||
py3-ruamel.yaml \
|
||||
py3-commonmark \
|
||||
py3-phonenumbers \
|
||||
py3-mako \
|
||||
#py3-prometheus-client \ (pulls in twisted unnecessarily)
|
||||
# Indirect dependencies
|
||||
py3-idna \
|
||||
py3-rsa \
|
||||
#py3-telethon \ (outdated)
|
||||
py3-pyaes \
|
||||
py3-aiodns \
|
||||
py3-python-socks \
|
||||
# cryptg
|
||||
py3-cffi \
|
||||
py3-qrcode \
|
||||
py3-brotli \
|
||||
# Other dependencies
|
||||
ffmpeg \
|
||||
ca-certificates \
|
||||
su-exec \
|
||||
netcat-openbsd \
|
||||
# encryption
|
||||
py3-olm \
|
||||
py3-pycryptodome \
|
||||
py3-unpaddedbase64 \
|
||||
py3-future \
|
||||
bash \
|
||||
curl \
|
||||
jq \
|
||||
yq
|
||||
RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev
|
||||
|
||||
COPY requirements.txt /opt/mautrix-telegram/requirements.txt
|
||||
COPY optional-requirements.txt /opt/mautrix-telegram/optional-requirements.txt
|
||||
WORKDIR /opt/mautrix-telegram
|
||||
RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
|
||||
&& pip3 install --break-system-packages /cryptg-*.whl \
|
||||
&& pip3 install --break-system-packages --no-cache-dir -r requirements.txt -r optional-requirements.txt \
|
||||
&& apk del .build-deps \
|
||||
&& rm -f /cryptg-*.whl
|
||||
COPY . /build
|
||||
WORKDIR /build
|
||||
RUN go build -o /usr/bin/mautrix-telegram
|
||||
|
||||
COPY . /opt/mautrix-telegram
|
||||
RUN apk add git && pip3 install --break-system-packages --no-cache-dir .[all] && apk del git \
|
||||
# This doesn't make the image smaller, but it's needed so that the `version` command works properly
|
||||
&& cp mautrix_telegram/example-config.yaml . && rm -rf mautrix_telegram .git build
|
||||
FROM alpine:3.19
|
||||
|
||||
ENV UID=1337 \
|
||||
GID=1337
|
||||
|
||||
RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq curl
|
||||
|
||||
COPY --from=builder /usr/bin/mautrix-telegram /usr/bin/mautrix-telegram
|
||||
COPY --from=builder /build/example-config.yaml /opt/mautrix-telegram/example-config.yaml
|
||||
COPY --from=builder /build/docker-run.sh /docker-run.sh
|
||||
VOLUME /data
|
||||
ENV UID=1337 GID=1337 \
|
||||
FFMPEG_BINARY=/usr/bin/ffmpeg
|
||||
|
||||
CMD ["/opt/mautrix-telegram/docker-run.sh"]
|
||||
CMD ["/docker-run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user