Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

731
Vistas
Cannot run PlayWright inside docker image

I`m trying to create .net 5.0 docker image with playwright. This is my DockerFile:

FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["Agent.csproj", "Agent/"]
RUN dotnet restore "Agent/Agent.csproj"
COPY . "/src/Agent"
WORKDIR "/src/Agent"
RUN apt-get update -yq && apt-get upgrade -yq && apt-get install -yq curl git nano
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -yq nodejs build-essential
RUN npm install -g npm

RUN dotnet add package Microsoft.Playwright
RUN dotnet build "Agent.csproj" -c Release -o /app/build
RUN npx playwright install

But once I run inside my image command dotnet run Agent it gives me following error:

Executable doesn't exist at /root/.cache/ms-playwright/chromium-907428/chrome-linux/chrome
Please run the following command to download new browsers:              
║                                                                         
║     npx playwright install

Even though my dockerfile contains RUN npx playwright install seems like its not installing it. When I will remove it from my dockerfile and execute it manualy on running image it seems to be ok. Any ideas how I can execute properly playwright install using dockerfile?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I think this is a known issue in Playwright. You can see the detailed discussion here, and particularly see this comment

The solution I've seen mostly working is to either delete the node_modules entirely and then re-install it again, or in case of a docker image, try the solution mentioned in this link, by setting the playwright browsers to a specific path

over 4 years ago · Santiago Trujillo Denunciar

0

My problem was that I have installed different version of chromium vs playwright

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda