From a7ab44d67b8521b694709505415ee3ca903487d8 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Wed, 19 Nov 2025 15:56:36 +0100 Subject: [PATCH] feat: change docker image creation --- .dockerignore | 4 ++++ Dockerfile | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 782a267..889c9d9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,3 +11,7 @@ venv/ .gitignore node_modules/ uv.lock +test.py +result.xml +README.md +.gitea/ diff --git a/Dockerfile b/Dockerfile index 7207b86..2c9f603 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,20 @@ # syntax=docker/dockerfile:1 -FROM python:3.13 +FROM python:3.13-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ - PIP_DISABLE_PIP_VERSION_CHECK=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 \ + # Playwright won't be installed for actual browser automation + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 WORKDIR /app -# Copy dependency list and install first (leverages Docker layer cache) +# Install only runtime dependencies needed for bibapi and requests +# This avoids installing Playwright browsers which are huge COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt && \ + # Clean up pip cache + rm -rf /root/.cache/pip # Copy application code COPY app ./app