Dockerfile.original 959 B

12345678910111213141516171819202122232425
  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:5.0 AS base
  5. WORKDIR /app
  6. EXPOSE 80
  7. EXPOSE 443
  8. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  9. WORKDIR /src
  10. COPY ["XYY.API.Tracking/XYY.API.Tracking.csproj", "XYY.API.Tracking/"]
  11. RUN dotnet restore "XYY.API.Tracking/XYY.API.Tracking.csproj"
  12. COPY . .
  13. WORKDIR "/src/XYY.API.Tracking"
  14. RUN dotnet build "XYY.API.Tracking.csproj" -c Release -o /app/build
  15. FROM build AS publish
  16. RUN dotnet publish "XYY.API.Tracking.csproj" -c Release -o /app/publish
  17. FROM base AS final
  18. WORKDIR /app
  19. COPY --from=publish /app/publish .
  20. ENTRYPOINT ["dotnet", "XYY.API.Tracking.dll"]