C#C
C#2y ago
Alex

✅ Run PuppeteerSharp in Docker Container

I have an endpoint that creates PDFs using PuppeteerSharp. I work fine locally because it can automatically download Chromium. The opposite in the Docker Container, it tells me that no executable chromium found. Is there a way to pre download?

FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
WORKDIR /App

COPY . ./

RUN dotnet restore
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /App
COPY --from=build /App/out .
ENTRYPOINT ["dotnet", "Vocabify.API.dll"]
Was this page helpful?