-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (27 loc) · 892 Bytes
/
Dockerfile
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
#===========================================#
# DOTNET BUILD #
#===========================================#
FROM microsoft/dotnet:2.2-sdk as dotnet-build
ARG DOTNET_CONFIG=Release
WORKDIR /build
COPY /app/*.csproj ./
RUN dotnet restore
COPY /app/ .
RUN dotnet publish -c ${DOTNET_CONFIG} -o ./results
#===========================================#
# DOTNET TEST #
#===========================================#
FROM microsoft/dotnet:2.2-sdk as dotnet-test
WORKDIR /test
COPY --from=dotnet-build /build .
RUN dotnet test -c Test
#===========================================#
# IMAGE BUILD #
#===========================================#
FROM microsoft/dotnet:2.2-aspnetcore-runtime as image
ARG INSTALL_CLRDBG=exit
RUN bash -c "${INSTALL_CLRDBG}"
WORKDIR /app
EXPOSE 80
COPY --from="dotnet-build" /build/results .
ENTRYPOINT ["dotnet", "MidnightLizard.Schemes.Querier.dll"]