Skip to content

Commit a57315c

Browse files
authored
Merge pull request #685 from Akash-ainapur/fix-docker-build
Fixed docker build issue
2 parents 793399e + b6c665d commit a57315c

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

Dockerfile

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ FROM python:3.11-slim
44
ARG TARGETPLATFORM
55
ARG NODE_MAJOR=20
66

7-
# Install system dependencies
7+
# Install system dependencies (removed libgconf-2-4)
88
RUN 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
6364
RUN node -v && npm -v && npx -v
6465

6566
# Set up working directory
6667
WORKDIR /app
6768

6869
# Copy requirements and install Python dependencies
6970
COPY requirements.txt .
70-
7171
RUN 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
7774
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-browsers
7875
RUN 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
9081
COPY . .
9182

9283
# Set up supervisor configuration
@@ -96,4 +87,3 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
9687
EXPOSE 7788 6080 5901 9222
9788

9889
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
99-
#CMD ["/bin/bash"]

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ services:
6868
- /tmp/.X11-unix:/tmp/.X11-unix
6969
# - ./my_chrome_data:/app/data/chrome_data # Optional: persist browser data
7070
restart: unless-stopped
71-
shm_size: '2gb'
71+
shm_size: "2gb"
7272
cap_add:
7373
- SYS_ADMIN
7474
tmpfs:
@@ -77,4 +77,4 @@ services:
7777
test: ["CMD", "nc", "-z", "localhost", "5901"] # VNC port
7878
interval: 10s
7979
timeout: 5s
80-
retries: 3
80+
retries: 3

0 commit comments

Comments
 (0)