基础服务api
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 1.3 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
123456789101112131415161718192021222324252627
  1. #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
  3. WORKDIR /app
  4. EXPOSE 80
  5. EXPOSE 443
  6. FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
  7. WORKDIR /src
  8. COPY ["NuGet.config", "."]
  9. COPY ["BPA.SAAS.Manage.Web.Entry/BPA.SAAS.Manage.Web.Entry.csproj", "BPA.SAAS.Manage.Web.Entry/"]
  10. COPY ["BPA.SAAS.Manage.Web.Core/BPA.SAAS.Manage.Web.Core.csproj", "BPA.SAAS.Manage.Web.Core/"]
  11. COPY ["BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj", "BPA.SAAS.Manage.Application/"]
  12. COPY ["BPA.SAAS.Manage.Comm/BPA.SAAS.Manage.Comm.csproj", "BPA.SAAS.Manage.Comm/"]
  13. COPY ["BPA.SAAS.Manage.Core/BPA.SAAS.Manage.Core.csproj", "BPA.SAAS.Manage.Core/"]
  14. RUN dotnet restore "BPA.SAAS.Manage.Web.Entry/BPA.SAAS.Manage.Web.Entry.csproj" --configfile "NuGet.config"
  15. COPY . .
  16. WORKDIR "/src/BPA.SAAS.Manage.Web.Entry"
  17. RUN dotnet build "BPA.SAAS.Manage.Web.Entry.csproj" -c Release -o /app/build
  18. FROM build AS publish
  19. RUN dotnet publish "BPA.SAAS.Manage.Web.Entry.csproj" -c Release -o /app/publish /p:UseAppHost=false
  20. FROM base AS final
  21. WORKDIR /app
  22. COPY --from=publish /app/publish .
  23. ENTRYPOINT ["dotnet", "BPA.SAAS.Manage.Web.Entry.dll"]