kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch02/docker-images/whoami/Dockerfile

18 lines
332 B
Docker
Raw Permalink Normal View History

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine as builder
WORKDIR /src
COPY src/whoami.csproj .
RUN dotnet restore
COPY src /src
RUN dotnet publish -c Release -o /out whoami.csproj
# app image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
EXPOSE 80
WORKDIR /app
ENTRYPOINT ["dotnet", "whoami.dll"]
COPY --from=builder /out/ .