You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue with my Dockerized AdonisJS project where Playwright is unable to launch the browser, resulting in the error message:
browserType.launch: Executable doesn't exist at /root/.cache/ms-playwright/chromium-1105/chrome-linux/chrome
The Dockerfile installs all the necessary dependencies for Playwright and my AdonisJS project. However, when I run the container, I receive the mentioned error.
I've verified that npx playwright install is executed during the Docker build process. Additionally, the Dockerfile copies all files, including the modules, into a folder named app.
Is there something I'm missing in my Docker setup or Playwright configuration that could be causing this issue? Any suggestions or insights would be greatly appreciated.
I'm not using Alpine because the Playwright documentation mentions that some dependencies are missing in that image, but technically it's the same. Playwright Docker
Use this example to make my dockerfile Example Dockerfile
FROM node:20.11.1 as base
# Install dependencies needed by Playwright
RUN apk add --no-cache \
libxkbcommon \
dbus \
ttf-freefont \
udev \
xvfb \
zlib \
chromium \
chromium-chromedriver \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
&& rm -rf /var/cache/apk/*
# install dependences
FROM base as deps
WORKDIR /app
COPY . .
COPY package.json package-lock.json ./
RUN npm install
# Install Playwright and browsers
RUN npx playwright install
# Production only deps stage
FROM base as production-deps
WORKDIR /app
ADD package.json package-lock.json ./
RUN npm install
# Install Playwright and browsers
RUN npx playwright install
# Build
FROM base as build
WORKDIR /app
COPY --from=deps /app/node_modules /app/node_modules
COPY . .
COPY .env.example .env
RUN npm run build
# Set the entry point for the container
FROM base
ENV NODE_ENV=production
WORKDIR /app
COPY --from=production-deps /app/node_modules /app/node_modules
COPY --from=build /app/build /app
COPY .env.example .env
EXPOSE 3333
CMD ["node", "./bin/server.js"]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm encountering an issue with my Dockerized AdonisJS project where Playwright is unable to launch the browser, resulting in the error message:
browserType.launch: Executable doesn't exist at /root/.cache/ms-playwright/chromium-1105/chrome-linux/chrome
The Dockerfile installs all the necessary dependencies for Playwright and my AdonisJS project. However, when I run the container, I receive the mentioned error.
I've verified that npx playwright install is executed during the Docker build process. Additionally, the Dockerfile copies all files, including the modules, into a folder named app.
I'm trying that but doesnt work Playwright won't launch browser in Docker container
Is there something I'm missing in my Docker setup or Playwright configuration that could be causing this issue? Any suggestions or insights would be greatly appreciated.
I'm not using Alpine because the Playwright documentation mentions that some dependencies are missing in that image, but technically it's the same. Playwright Docker
Use this example to make my dockerfile Example Dockerfile
Beta Was this translation helpful? Give feedback.
All reactions