alpine dockerfile
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,14 +1,12 @@
|
||||
FROM python:3.12-slim
|
||||
FROM python:3.12-alpine
|
||||
|
||||
# ffmpeg is non-negotiable — yt-dlp will silently fail without it
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Alpine's package manager (apk) doesn't pull in 300MB of useless dependencies
|
||||
RUN apk add --no-cache ffmpeg
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install deps first so Docker layer cache doesn't rebuild on code changes
|
||||
COPY requirements.txt .
|
||||
# --no-cache-dir is mandatory or pip leaves a bunch of trash behind
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY main.py .
|
||||
@@ -16,3 +14,4 @@ COPY main.py .
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python3", "main.py"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user