From 57c0f0eb078566c255d7b2ec5638c4d993dbd7c4 Mon Sep 17 00:00:00 2001 From: Dhanalakshmi Gopalswamy <34273718+acn-dgopa@users.noreply.github.com> Date: Tue, 15 Aug 2023 10:38:05 +0200 Subject: [PATCH] Create Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd71053 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Building the auditlog api +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build +COPY src/Altinn.Auth.AuditLog ./Altinn.Auth.AuditLog +WORKDIR Altinn.Auth.AuditLog/ +RUN dotnet build Altinn.Auth.AuditLog.csproj -c Release -o /app_output +RUN dotnet publish Altinn.Auth.AuditLog.csproj -c Release -o /app_output + +# Building the final image +FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS final +EXPOSE 80 +WORKDIR /app +COPY --from=build /app_output . + +ENTRYPOINT ["dotnet", "Altinn.Auth.AuditLog.dll"]