diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cd967fc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.idea +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/PdfService/Dockerfile b/PdfService/Dockerfile new file mode 100644 index 0000000..e4c1067 --- /dev/null +++ b/PdfService/Dockerfile @@ -0,0 +1,11 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +WORKDIR /src +COPY . . +RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ + dotnet publish --self-contained false -o /app + +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final +WORKDIR /app +COPY --from=build /app . + +ENTRYPOINT ["dotnet", "PdfService.dll"] diff --git a/PdfService/PdfService.csproj b/PdfService/PdfService.csproj index dd808c1..0c3f8a0 100644 --- a/PdfService/PdfService.csproj +++ b/PdfService/PdfService.csproj @@ -11,4 +11,10 @@ + + + .dockerignore + + +