Dockerfile 1.3 KB

123456789101112131415161718192021222324252627
  1. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
  3. WORKDIR /app
  4. EXPOSE 80
  5. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  6. WORKDIR /src
  7. COPY ["XYY.API.Tracking/XYY.API.Tracking.csproj", "XYY.API.Tracking/"]
  8. COPY ["3.Service/XYY.Service.Standard.RegionService/XYY.Service.Standard.RegionService.csproj", "3.Service/XYY.Service.Standard.RegionService/"]
  9. COPY ["1.Command/XYY.Core.Standard/XYY.Core.Standard.csproj", "1.Command/XYY.Core.Standard/"]
  10. COPY ["1.Command/XYY.Common.Standard/XYY.Common.Standard.csproj", "1.Command/XYY.Common.Standard/"]
  11. COPY ["1.Command/XYY.PerformanceCount.Standard/XYY.PerformanceCount.Standard.csproj", "1.Command/XYY.PerformanceCount.Standard/"]
  12. COPY ["1.Command/XYY.Task.Standard/XYY.TaskTrack.Standard.csproj", "1.Command/XYY.Task.Standard/"]
  13. COPY ["2.Data/XYY.Model.Strandard/XYY.Model.Standard.csproj", "2.Data/XYY.Model.Strandard/"]
  14. RUN dotnet restore "XYY.API.Tracking/XYY.API.Tracking.csproj"
  15. COPY . .
  16. WORKDIR "/src/XYY.API.Tracking"
  17. RUN dotnet build "XYY.API.Tracking.csproj" -c Release -o /app/build
  18. FROM build AS publish
  19. RUN dotnet publish "XYY.API.Tracking.csproj" -c Release -o /app/publish
  20. FROM base AS final
  21. WORKDIR /app
  22. COPY --from=publish /app/publish .
  23. ENTRYPOINT ["dotnet", "XYY.API.Tracking.dll"]