-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
18 lines (16 loc) · 743 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Building the auditlog api
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
ARG SOURCE_REVISION_ID=LOCALBUILD
COPY src .
WORKDIR Altinn.Auth.AuditLog/
RUN echo "Building Altinn.Auth.AuditLog with SourceRevisionId=${SOURCE_REVISION_ID}"
RUN dotnet build Altinn.Auth.AuditLog.csproj -c Release -o /app_output -p SourceRevisionId=${SOURCE_REVISION_ID}
RUN dotnet publish Altinn.Auth.AuditLog.csproj -c Release -o /app_output -p SourceRevisionId=${SOURCE_REVISION_ID}
# Building the final image
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
EXPOSE 5166
WORKDIR /app
COPY --from=build /app_output .
COPY src/Altinn.Auth.AuditLog/Migration ./Migration
RUN mkdir /tmp/logtelemetry
ENTRYPOINT ["dotnet", "Altinn.Auth.AuditLog.dll"]