Update wrapper/dockerfile
This commit is contained in:
parent
13e2623bf9
commit
82f4d0e75c
@ -1,32 +1,28 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# ---- base utils ----
|
# Base tools
|
||||||
RUN apt-get update && \
|
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
|
||||||
apt-get install -y --no-install-recommends git ca-certificates && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip install --no-cache-dir pip setuptools wheel
|
RUN pip install --no-cache-dir pip setuptools wheel
|
||||||
|
|
||||||
# ---- (optional) Playwright OS libs ----
|
# Playwright OS deps (Debian runtime libs for Chromium)
|
||||||
ARG WITH_PLAYWRIGHT=1
|
ARG WITH_PLAYWRIGHT=1
|
||||||
RUN if [ "$WITH_PLAYWRIGHT" = "1" ]; then \
|
RUN if [ "$WITH_PLAYWRIGHT" = "1" ]; then \
|
||||||
set -eux; \
|
set -eux; apt-get update && apt-get install -y --no-install-recommends \
|
||||||
apt-get update && apt-get install -y --no-install-recommends \
|
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdbus-1-3 \
|
||||||
libgtk-3-0 libgdk-pixbuf-2.0-0 libpangocairo-1.0-0 libcairo-gobject2 libxcursor1 \
|
libx11-xcb1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
|
||||||
libnss3 libnspr4 libdrm2 libgbm1 libxss1 libxshmfence1 libx11-xcb1 \
|
libgbm1 libgtk-3-0 libpango-1.0-0 libcairo2 libasound2 \
|
||||||
libxcomposite1 libxdamage1 libxrandr2 libxtst6 libxfixes3 libxext6 libxi6 \
|
libdrm2 libxss1 libxshmfence1 libxext6 libxi6 libxkbcommon0 \
|
||||||
libxkbcommon0 libpango-1.0-0 libasound2 xdg-utils fonts-liberation wget \
|
xdg-utils fonts-liberation wget \
|
||||||
&& rm -rf /var/lib/apt/lists/*; \
|
&& rm -rf /var/lib/apt/lists/*; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ---- install wrapper python deps (includes playwright) ----
|
# Wrapper deps (keep playwright here even if repo requirements don't list it)
|
||||||
# keep this separate from repo requirements; the wrapper must have playwright even if repo doesn't list it
|
RUN pip install --no-cache-dir playwright
|
||||||
COPY requirements.txt /app/requirements-wrapper.txt
|
|
||||||
RUN pip install --no-cache-dir -r /app/requirements-wrapper.txt
|
|
||||||
|
|
||||||
# ---- wrapper files ----
|
# Wrapper files
|
||||||
COPY wrapper.py /app/wrapper.py
|
COPY wrapper.py /app/wrapper.py
|
||||||
COPY start.sh /app/start.sh
|
COPY start.sh /app/start.sh
|
||||||
RUN chmod +x /app/start.sh
|
RUN chmod +x /app/start.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user