| | |
| | FROM python:3.9-slim-bookworm |
| |
|
| | |
| | WORKDIR /app |
| |
|
| | |
| | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| | wget \ |
| | fontconfig \ |
| | libjpeg62-turbo \ |
| | libxext6 \ |
| | xfonts-75dpi \ |
| | xfonts-base \ |
| | libxrender1 \ |
| | libssl3 \ |
| | && apt-get clean \ |
| | && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb && \ |
| | dpkg -i wkhtmltox_0.12.6.1-3.bookworm_amd64.deb && \ |
| | rm wkhtmltox_0.12.6.1-3.bookworm_amd64.deb |
| |
|
| | |
| | RUN useradd -m -u 1000 user |
| |
|
| | |
| | COPY requirements.txt . |
| | RUN pip install --no-cache-dir -r requirements.txt |
| |
|
| | |
| | USER user |
| | ENV HOME=/home/user \ |
| | PATH=/home/user/.local/bin:$PATH |
| |
|
| | |
| | COPY --chown=1000:1000 app.py . |
| |
|
| | |
| | EXPOSE 7860 |
| |
|
| | |
| | CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"] |