Nenhuma descrição

1234567891011121314151617181920212223242526272829
  1. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
  3. #For more information, please see https://aka.ms/containercompat
  4. FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
  5. WORKDIR /app
  6. EXPOSE 80
  7. FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
  8. WORKDIR /src
  9. COPY ["Backend.API/Backend.API.csproj", "Backend.API/"]
  10. COPY ["Backend.Common/Backend.Common.csproj", "Backend.Common/"]
  11. COPY ["Mediator/Mediator.csproj", "Mediator/"]
  12. COPY ["Backend.Models/Backend.Models.csproj", "Backend.Models/"]
  13. COPY ["Backend.Services/Backend.Services.csproj", "Backend.Services/"]
  14. COPY ["Backend.Data/Backend.Data.csproj", "Backend.Data/"]
  15. RUN dotnet restore "Backend.API/Backend.API.csproj"
  16. COPY . .
  17. WORKDIR "/src/Backend.API"
  18. RUN dotnet build "Backend.API.csproj" -c Release -o /app/build
  19. FROM build AS publish
  20. RUN dotnet publish "Backend.API.csproj" -c Release -o /app/publish
  21. FROM base AS final
  22. WORKDIR /app
  23. COPY --from=publish /app/publish .
  24. ENTRYPOINT ["dotnet", "Backend.API.dll"]

Powered by TurnKey Linux.