kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch03/docker-images/numbers/numbers-api/Dockerfile.windows

18 lines
406 B
Docker
Raw Permalink Normal View History

FROM mcr.microsoft.com/dotnet/sdk:6.0-nanoserver-1809 AS builder
WORKDIR /src
COPY src/Numbers.Api/Numbers.Api.csproj .
RUN dotnet restore
COPY src/Numbers.Api/ .
RUN dotnet publish -c Release -o /out Numbers.Api.csproj
# app image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-nanoserver-1809
ENV FailAfterCallCount=0
ENTRYPOINT ["dotnet", "/app/Numbers.Api.dll"]
WORKDIR /app
COPY --from=builder /out/ .