shaiwatcher/wrapper/dockerfile
frarol96 d3f140c0e8 Update wrapper/dockerfile
Added playwright and chromium for data scraping, and simplified env designation
2025-08-16 05:03:13 +00:00

27 lines
687 B
Plaintext

FROM python:3.11-slim
ARG WITH_PLAYWRIGHT=0
WORKDIR /app
# git + CA, and tools used by playwright bootstrap when enabled
RUN apt-get update && \
apt-get install -y --no-install-recommends git ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
# Faster, cleaner pip
RUN pip install --no-cache-dir pip setuptools wheel
# Optional: bake Playwright in (pass --build-arg WITH_PLAYWRIGHT=1)
RUN if [ "$WITH_PLAYWRIGHT" = "1" ]; then \
pip install --no-cache-dir playwright && \
python -m playwright install --with-deps chromium; \
fi
# Wrapper entrypoint
COPY start.sh /start.sh
COPY wrapper.py /app/wrapper.py
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]