@@ -4,15 +4,14 @@ FROM python:3.11-slim
44ARG TARGETPLATFORM
55ARG NODE_MAJOR=20
66
7- # Install system dependencies
7+ # Install system dependencies (removed libgconf-2-4)
88RUN apt-get update && apt-get install -y \
99 wget \
1010 netcat-traditional \
1111 gnupg \
1212 curl \
1313 unzip \
1414 xvfb \
15- libgconf-2-4 \
1615 libxss1 \
1716 libnss3 \
1817 libnspr4 \
@@ -30,6 +29,8 @@ RUN apt-get update && apt-get install -y \
3029 libxrandr2 \
3130 xdg-utils \
3231 fonts-liberation \
32+ fonts-noto-color-emoji \
33+ fonts-unifont \
3334 dbus \
3435 xauth \
3536 x11vnc \
@@ -56,37 +57,27 @@ RUN mkdir -p /etc/apt/keyrings \
5657 && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
5758 && 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 \
5859 && apt-get update \
59- && apt-get install nodejs -y \
60+ && apt-get install -y nodejs \
6061 && rm -rf /var/lib/apt/lists/*
6162
62- # Verify Node.js and npm installation (optional, but good for debugging)
63+ # Verify Node.js and npm installation
6364RUN node -v && npm -v && npx -v
6465
6566# Set up working directory
6667WORKDIR /app
6768
6869# Copy requirements and install Python dependencies
6970COPY requirements.txt .
70-
7171RUN pip install --no-cache-dir -r requirements.txt
7272
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
7774ENV PLAYWRIGHT_BROWSERS_PATH=/ms-browsers
7875RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH
7976
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
8879
89- # Copy the application code
80+ # Copy application code
9081COPY . .
9182
9283# Set up supervisor configuration
@@ -96,4 +87,3 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
9687EXPOSE 7788 6080 5901 9222
9788
9889CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/conf.d/supervisord.conf" ]
99- # CMD ["/bin/bash"]
0 commit comments