31 lines
817 B
Docker
31 lines
817 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Trust Windows/corporate root CAs before any network operations
|
|
COPY certs/windows-ca-bundle.crt /usr/local/share/ca-certificates/windows-ca-bundle.crt
|
|
RUN update-ca-certificates
|
|
|
|
# Install system dependencies including Node.js for yt-dlp JavaScript runtime
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
weasyprint \
|
|
libcairo2 \
|
|
libpango-1.0-0 \
|
|
libgobject-2.0-0 \
|
|
ffmpeg \
|
|
ca-certificates \
|
|
curl \
|
|
libmagic1 \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
|
&& update-ca-certificates \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|