transcriptor-web/docker/python/Dockerfile
2025-04-25 08:42:43 +02:00

28 lines
593 B
Docker

FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies for WeasyPrint
RUN apt-get update && apt-get install -y \
python3-pip \
libpango-1.0-0 \
libharfbuzz0b \
libpangoft2-1.0-0 \
libharfbuzz-subset0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir Flask PyMuPDF weasyprint
# Copy application files
COPY ./src/scripts/pdf_manage.py /app/pdf_manage.py
# Expose the Flask port
EXPOSE 5000
# Run Flask server
CMD ["python", "pdf_manage.py"]