-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (37 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
44 lines (37 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.13-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libleveldb-dev \
git \
&& rm -rf /var/lib/apt/lists/*
COPY . /src
WORKDIR /src
RUN pip install --no-cache-dir uv \
&& uv pip install --system --no-cache-dir . \
&& playwright install --with-deps chromium
FROM python:3.13-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libleveldb1d \
libsnappy1v5 \
# playwright chromium dependencies
libnss3 \
libatk1.0-0t64 \
libatk-bridge2.0-0t64 \
libcups2t64 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2t64 \
libxshmfence1 \
fonts-liberation \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/python3.13 /usr/local/lib/python3.13
COPY --from=builder /usr/local/bin/subprober /usr/local/bin/subprober
COPY --from=builder /usr/local/bin/playwright /usr/local/bin/playwright
COPY --from=builder /root/.cache/ms-playwright /root/.cache/ms-playwright
ENTRYPOINT ["subprober"]