From 797ed667a29045615abf5dfc2884a4635b65b793 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 5 May 2026 00:05:19 +0200 Subject: [PATCH] fix: restore consent-tester Dockerfile (was lost from main) Co-Authored-By: Claude Opus 4.6 (1M context) --- consent-tester/Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 consent-tester/Dockerfile diff --git a/consent-tester/Dockerfile b/consent-tester/Dockerfile new file mode 100644 index 0000000..02f21e8 --- /dev/null +++ b/consent-tester/Dockerfile @@ -0,0 +1,31 @@ +FROM python:3.12-slim-bookworm + +WORKDIR /app + +# Install system dependencies for Playwright/Chromium +RUN apt-get update && apt-get install -y --no-install-recommends \ + libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \ + libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \ + libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Create user BEFORE installing Playwright (so browsers are in user's cache) +RUN useradd --create-home appuser + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# Install Playwright browsers AS appuser (so they land in /home/appuser/.cache/) +USER appuser +RUN playwright install chromium +USER root + +COPY . . +RUN chown -R appuser:appuser /app + +USER appuser + +EXPOSE 8094 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8094"]