SunJian/WebApi/Dockerfile

11 lines
279 B
Docker
Raw Normal View History

2023-12-10 21:53:47 +08:00
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /source
COPY WebApi.csproj .
RUN dotnet restore WebApi.csproj
COPY . .
RUN dotnet publish -c release -o /app
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "WebApi.dll"]