Files
Telegram-Downloader-Bot/Dockerfile
Roman Krček c633aebbc2
All checks were successful
Build Docker image / test (push) Successful in 32s
Build Docker image / build (push) Successful in 41s
Fix CVE-2024-6345 by upgrading setuptools
2024-10-07 17:43:46 +02:00

24 lines
598 B
Docker

FROM python:3.11-slim AS base
LABEL maintainer="Roman Krček"
WORKDIR /app
# Builder stage
FROM base AS builder
COPY requirements.txt ./
RUN --mount=type=cache,target=/tmp/pip_cache \
python3 -m pip install --upgrade pip setuptools && \
pip install \
-r requirements.txt \
--extra-index-url https://www.piwheels.org/simple \
--cache-dir /tmp/pip_cache
# Runtime stage
FROM base AS runtime
COPY --from=builder /usr/local/lib /usr/local/lib
COPY telegram_downloader_bot/ telegram_downloader_bot/
VOLUME ["/data"]
ENTRYPOINT ["python3", "-m", "telegram_downloader_bot.main"]