-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
44 lines (35 loc) · 1.22 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
# Use Microsoft's Python base image with stable Ubuntu
FROM mcr.microsoft.com/playwright/python:v1.52.0-noble
WORKDIR /opt/application
COPY requirements.txt .
RUN pip install -r requirements.txt
# Install xvfb and dependencies for headed browser
RUN apt-get update && apt-get install -y \
fonts-dejavu \
xvfb \
x11-utils \
xauth \
vim \
net-tools \
iputils-ping \
telnet \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install internal chrome version
ARG PIP_INDEX_URL
ARG PIP_TRUSTED_HOST
ARG TARGETARCH
# 根据架构选择不同的Chromium安装包
RUN set -eux; \
apt-get update; \
if [ "$TARGETARCH" = "amd64" ]; then \
CHROMIUM_URL="https://lf3-ttcdn-tos.pstatp.com/obj/rocketpackagebackup/tmp_apks/1747194348chromium-browser-use-stable_117.0.5938.60-1_amd64.deb"; \
else \
CHROMIUM_URL="https://lf3-ttcdn-tos.pstatp.com/obj/rocketpackagebackup/tmp_apks/1751460803chromium-browser-use-stable_117.0.5938.60-1_arm64.deb"; \
fi; \
curl -o /tmp/chromium.deb "$CHROMIUM_URL"; \
apt-get install -y --no-install-recommends /tmp/chromium.deb; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
COPY . .
RUN chmod +x ./run.sh
CMD ["./run.sh"]