Initial commit
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user