@@ -4,15 +4,14 @@ FROM python:3.11-slim
4
4
ARG TARGETPLATFORM
5
5
ARG NODE_MAJOR=20
6
6
7
- # Install system dependencies
7
+ # Install system dependencies (removed libgconf-2-4)
8
8
RUN apt-get update && apt-get install -y \
9
9
wget \
10
10
netcat-traditional \
11
11
gnupg \
12
12
curl \
13
13
unzip \
14
14
xvfb \
15
- libgconf-2-4 \
16
15
libxss1 \
17
16
libnss3 \
18
17
libnspr4 \
@@ -30,6 +29,8 @@ RUN apt-get update && apt-get install -y \
30
29
libxrandr2 \
31
30
xdg-utils \
32
31
fonts-liberation \
32
+ fonts-noto-color-emoji \
33
+ fonts-unifont \
33
34
dbus \
34
35
xauth \
35
36
x11vnc \
@@ -56,37 +57,27 @@ RUN mkdir -p /etc/apt/keyrings \
56
57
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
57
58
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
58
59
&& apt-get update \
59
- && apt-get install nodejs -y \
60
+ && apt-get install -y nodejs \
60
61
&& rm -rf /var/lib/apt/lists/*
61
62
62
- # Verify Node.js and npm installation (optional, but good for debugging)
63
+ # Verify Node.js and npm installation
63
64
RUN node -v && npm -v && npx -v
64
65
65
66
# Set up working directory
66
67
WORKDIR /app
67
68
68
69
# Copy requirements and install Python dependencies
69
70
COPY requirements.txt .
70
-
71
71
RUN pip install --no-cache-dir -r requirements.txt
72
72
73
- # Install playwright browsers and dependencies
74
- # playwright documentation suggests PLAYWRIGHT_BROWSERS_PATH is still relevant
75
- # or that playwright installs to a similar default location that Playwright would.
76
- # Let's assume playwright respects PLAYWRIGHT_BROWSERS_PATH or its default install location is findable.
73
+ # Playwright setup
77
74
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-browsers
78
75
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH
79
76
80
- # Install recommended: Google Chrome (instead of just Chromium for better undetectability)
81
- # The 'playwright install chrome' command might download and place it.
82
- # The '--with-deps' equivalent for playwright install is to run 'playwright install-deps chrome' after.
83
- # RUN playwright install chrome --with-deps
84
-
85
- # Alternative: Install Chromium if Google Chrome is problematic in certain environments
86
- RUN playwright install chromium --with-deps
87
-
77
+ # Install Chromium via Playwright without --with-deps
78
+ RUN PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 playwright install chromium
88
79
89
- # Copy the application code
80
+ # Copy application code
90
81
COPY . .
91
82
92
83
# Set up supervisor configuration
@@ -96,4 +87,3 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
96
87
EXPOSE 7788 6080 5901 9222
97
88
98
89
CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/conf.d/supervisord.conf" ]
99
- # CMD ["/bin/bash"]
0 commit comments