telegram-download-daemon/Dockerfile

21 lines
519 B
Text
Raw Normal View History

FROM python:3.9-bullseye AS compile-image
2020-04-24 03:11:24 +08:00
2021-05-02 02:54:12 +08:00
RUN echo $TARGETPLATFORM
2021-05-02 04:17:17 +08:00
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
2021-05-02 04:31:16 +08:00
which lsb_release \
lsb_release -a \
2021-05-02 04:25:18 +08:00
mv /usr/bin/lsb_release /usr/bin/lsb_release.bak \
pip install --no-cache-dir --user telethon; \
2021-05-02 04:17:17 +08:00
else \
pip install --no-cache-dir --user telethon cryptg; \
2021-05-02 04:17:17 +08:00
fi
2020-04-24 03:11:24 +08:00
FROM python:3.9-slim-bullseye AS run-image
COPY --from=compile-image /root/.local /root/.local
WORKDIR /app
COPY *.py ./
CMD [ "python3", "./telegram-download-daemon.py" ]