fix: Dockerfile - use PYTHONPATH for playwright install chromium
Some checks failed
CI / Banner Lint & Typecheck (push) Has been cancelled
CI / Banner Tests (push) Has been cancelled
CI / Detect changes (push) Has been cancelled
CI / API Lint (push) Has been cancelled
CI / API Tests (push) Has been cancelled
CI / Scanner Lint (push) Has been cancelled
CI / Scanner Tests (push) Has been cancelled
CI / Banner Build (push) Has been cancelled
CI / Admin UI Typecheck (push) Has been cancelled
CI / Admin UI Tests (push) Has been cancelled
CI / Admin UI Build (push) Has been cancelled

This commit is contained in:
Ami Bot
2026-04-20 20:32:30 +07:00
parent 3265228ce6
commit 08e0ae7e83

View File

@@ -15,8 +15,10 @@ COPY apps/scanner/pyproject.toml ./scanner/pyproject.toml
RUN pip install --no-cache-dir --prefix=/install api/. RUN pip install --no-cache-dir --prefix=/install api/.
# Install Scanner dependencies (Playwright + Chromium) # Install Scanner dependencies (Playwright + Chromium)
# PYTHONPATH needed because --prefix=/install doesn't auto-set site-packages path
RUN pip install --no-cache-dir --prefix=/install scanner/. \ RUN pip install --no-cache-dir --prefix=/install scanner/. \
&& playwright install chromium --with-deps && PYTHONPATH=/install/lib/python3.12/site-packages \
/install/bin/playwright install chromium --with-deps
# ── Runtime stage ──────────────────────────────────────────────────── # ── Runtime stage ────────────────────────────────────────────────────
FROM python:3.12-slim FROM python:3.12-slim