Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Docker/HTML_to_PDF_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
Expand All @@ -9,10 +9,12 @@ RUN apt-get update && \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
libnss3 libgbm1
WORKDIR /app


EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY ["HTML_to_PDF_docker/HTML_to_PDF_docker.csproj", "HTML_to_PDF_docker/"]
RUN dotnet restore "HTML_to_PDF_docker/HTML_to_PDF_docker.csproj"
Expand All @@ -22,6 +24,9 @@ RUN dotnet build "HTML_to_PDF_docker.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "HTML_to_PDF_docker.csproj" -c Release -o /app/publish
RUN chmod +x /app/runtimes/linux/native/chrome && \
chmod +x /app/runtimes/linux/native/chrome-wrapper


FROM base AS final
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions Docker/HTML_to_PDF_docker/HTML_to_PDF_docker.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>6c7f4163-1d66-435b-ab83-6a6f99a7006c</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Syncfusion.HtmlToPdfConverter.Net.Linux" Version="*" />
</ItemGroup>

Expand Down
Loading