forked from CMS-Enterprise/SONAR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.api
30 lines (26 loc) · 1010 Bytes
/
Dockerfile.api
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
27
28
29
30
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.19 AS build
LABEL org.opencontainers.image.licenses="CC0-1.0"
LABEL io.artifacthub.package.license="CC0-1.0"
WORKDIR /sonar/sonar-api
COPY sonar-api/sonar-api.csproj .
RUN mkdir /sonar/sonar-core
COPY sonar-core/sonar-core.csproj /sonar/sonar-core
COPY shared.props /sonar
RUN dotnet restore
COPY sonar-api .
COPY sonar-core /sonar/sonar-core
RUN dotnet build -c Release
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.19
LABEL org.opencontainers.image.licenses="CC0-1.0"
LABEL io.artifacthub.package.license="CC0-1.0"
RUN apk add --no-cache snappy-dev
RUN apk add --no-cache tzdata
# make sure we are running the most recent version of these libraries
RUN apk upgrade --no-cache libssl3 libcrypto3
# remove busybox (must be after usage of apk)
RUN rm /bin/*
WORKDIR /sonar/sonar-api
COPY --from=build /sonar/sonar-api/bin/Release/net8.0/* .
COPY --from=build /sonar/sonar-api/appsettings.json .
EXPOSE 8081
ENTRYPOINT ["dotnet", "cms.batcave.sonar.api.dll"]