Files
Telegram-Downloader-Bot/Dockerfile
Roman Krček c736ee6193 Initial commit
2024-07-22 14:16:53 +02:00

25 lines
596 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 \
python -m pip install --upgrade pip && \
pip install \
-r requirements.txt \
--extra-index-url https://www.piwheels.org/simple \
--cache-dir /tmp/pip_cache \
--user
# Runtime stage
FROM base AS runtime
COPY --from=builder /root/.local /root/.local
COPY telegram_downloader_bot/ telegram_downloader_bot/
VOLUME ["/data"]
ENTRYPOINT ["python3", "-m", "telegram_downloader_bot.main"]