Docker Community Forums

Share and learn in the Docker community.

I got this chromium error: TargetCrashedException while running multiple instance in Linux Docker

Net Core 3.1
Chrome version: 77.0.3865.90
Windows 10

I’m trying to perform HTML to PDF conversion with class library in Linux Docker using NET Core 3.1. The HTML converter has some dependency packages to be installed in the environment where the conversion takes place. We have installed the package in docker file.

Actual issue is, we have run the application for converting online site to pdf using chromium headless mode. We have a button for conversion, whenever we tried the parallel conversion in multiple instance of chrome browser. It will throws the Target.Crashed exception after a few instance.

I have attached the docker file code here,

FROM AS base
RUN apt-get update && \
     apt-get install -yq --no-install-recommends \ 
     libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ 
     libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ 
     libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \ 
     libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ 

FROM AS build
COPY ["HtmlToPDF_BlinkDocker_v3.1/HtmlToPDF_BlinkDocker_v3.1.csproj", "HtmlToPDF_BlinkDocker_v3.1/"]
RUN dotnet restore "HtmlToPDF_BlinkDocker_v3.1/HtmlToPDF_BlinkDocker_v3.1.csproj"
COPY . .
WORKDIR "/src/HtmlToPDF_BlinkDocker_v3.1"
RUN dotnet build "HtmlToPDF_BlinkDocker_v3.1.csproj" -c Release -o /app

FROM build AS publish
RUN dotnet publish "HtmlToPDF_BlinkDocker_v3.1.csproj" -c Release -o /app

FROM base AS final
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "HtmlToPDF_BlinkDocker_v3.1.dll"]

I have tried to increase the container storage size, still Im getting an same exception.

Can someone help me to resolve this exception in Linux docker using chromium binaries in VS2019.

Gowtham K

install gauge: brew install gauge
npm install : Downloading Chromium r637110 - 85.9 Mb [====================] 100% 0.0s
Chromium downloaded to /Users/Workspace/gauge-testing/node_modules/taiko/.local-chromium/mac-637110
npm WARN gauge-taiko-template@0.0.1 No repository field.
npm WARN gauge-taiko-template@0.0.1 No license field.
added 210 packages from 155 contributors and audited 358 packages in 25.195s
found 0 vulnerabilities

execute test using exiting docker image:…/docker run -it -v pwd:/gauge getgauge/taiko gauge run specs/