#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src COPY ["XYY.API.Tracking/XYY.API.Tracking.csproj", "XYY.API.Tracking/"] COPY ["3.Service/XYY.Service.Standard.RegionService/XYY.Service.Standard.RegionService.csproj", "3.Service/XYY.Service.Standard.RegionService/"] COPY ["1.Command/XYY.Core.Standard/XYY.Core.Standard.csproj", "1.Command/XYY.Core.Standard/"] COPY ["1.Command/XYY.Common.Standard/XYY.Common.Standard.csproj", "1.Command/XYY.Common.Standard/"] COPY ["1.Command/XYY.PerformanceCount.Standard/XYY.PerformanceCount.Standard.csproj", "1.Command/XYY.PerformanceCount.Standard/"] COPY ["1.Command/XYY.Task.Standard/XYY.TaskTrack.Standard.csproj", "1.Command/XYY.Task.Standard/"] COPY ["2.Data/XYY.Model.Strandard/XYY.Model.Standard.csproj", "2.Data/XYY.Model.Strandard/"] RUN dotnet restore "XYY.API.Tracking/XYY.API.Tracking.csproj" COPY . . WORKDIR "/src/XYY.API.Tracking" RUN dotnet build "XYY.API.Tracking.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "XYY.API.Tracking.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "XYY.API.Tracking.dll"]