FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 ##################### #PUPPETEER RECIPE ##################### # Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) # Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer # installs, work. RUN apt-get update && apt-get -f install && apt-get -y install wget gnupg2 apt-utils RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && apt-get update \ && apt-get install -y google-chrome-unstable --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ##################### #END PUPPETEER RECIPE ##################### ENV PUPPETEER_EXECUTABLE_PATH "/usr/bin/google-chrome-unstable" FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["BetterIServ.Backend.csproj", ""] RUN dotnet restore "BetterIServ.Backend.csproj" COPY . . WORKDIR "/src" RUN dotnet build "BetterIServ.Backend.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "BetterIServ.Backend.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "BetterIServ.Backend.dll"]