-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 816 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Build image
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETARCH
WORKDIR /
ENV CI=true
COPY . .
RUN dotnet build src/ServiceControl.Audit/ServiceControl.Audit.csproj --configuration Release -graph --property:TargetArch=$TARGETARCH
RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck
# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
WORKDIR /app
EXPOSE 44444
COPY --from=build /deploy/Particular.ServiceControl.Audit /app
COPY --from=build /healthcheck /healthcheck
ENV PersistenceType=RavenDB \
AuditRetentionPeriod=7
HEALTHCHECK --start-period=10s CMD ["/healthcheck/healthcheck", "http://localhost:44444/api/configuration"]
USER $APP_UID
ENTRYPOINT ["/app/ServiceControl.Audit"]