You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 544B

4 months ago
12345678910111213141516
  1. FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
  2. WORKDIR /app
  3. EXPOSE 9090
  4. FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
  5. WORKDIR /src
  6. COPY ["docker-dotnetcore-api.csproj", "."]
  7. RUN dotnet restore "./docker-dotnetcore-api.csproj"
  8. COPY . .
  9. WORKDIR "/src/."
  10. RUN dotnet build "docker-dotnetcore-api.csproj" -c Release -o /app/build
  11. FROM build AS publish
  12. RUN dotnet publish "docker-dotnetcore-api.csproj" -c Release -o /app/publish
  13. FROM base AS final
  14. WORKDIR /app
  15. COPY --from=publish /app/publish .
  16. ENTRYPOINT ["dotnet", "docker-dotnetcore-api.dll"]