From 08343df851b5c5f15a119a5cd2c22fea2b1ea35c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 3 Nov 2024 01:09:09 +0530 Subject: [PATCH] chore: dependencies for playwright --- server/Dockerfile | 54 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 4ff94c03..8e5c21bb 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -19,7 +19,59 @@ RUN npm install RUN npx playwright install --with-deps chromium # Install xvfb for display support -RUN apt-get update && apt-get install -y xvfb +#RUN apt-get update && apt-get install -y xvfb + +# RUN apt-get update && apt-get install -y \ +# libgbm-dev \ +# libxkbcommon-x11-0 \ +# libxcomposite1 \ +# libxdamage1 \ +# libxrandr2 \ +# libxshmfence1 \ +# libxtst6 \ +# libnss3 \ +# libatk1.0-0 \ +# libatk-bridge2.0-0 \ +# libdrm2 \ +# libxcb1 \ +# libxkbcommon0 \ +# fonts-noto-color-emoji \ +# fonts-unifont \ +# libpango-1.0-0 \ +# libcairo2 \ +# libasound2 \ +# libglib2.0-0 \ +# libdbus-1-3 \ +# && rm -rf /var/lib/apt/lists/* + +# Create and set permissions for chrome directories +# Create the Chromium data directory with necessary permissions +RUN mkdir -p /tmp/chromium-data-dir && \ + chmod -R 777 /tmp/chromium-data-dir + +# Install dependencies +RUN apt-get update && apt-get install -y \ + libgbm-dev \ + libnss3 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libglib2.0-0 \ + libdbus-1-3 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxi6 \ + libxtst6 \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix + +# Add a dbus configuration to prevent connection errors +# RUN mkdir -p /var/run/dbus # Make the script executable RUN chmod +x ./start.sh