Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Dockerfile 981 B

2 år sedan
2 år sedan
2 år sedan
2 år sedan
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: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 ["DataVAPI/DataVAPI.csproj", "DataVAPI/"]
  10. COPY ["DataVApi.Order/DataVApi.Order.csproj", "DataVApi.Order/"]
  11. COPY ["DataVAPI.ServerDB/DataVAPI.ServerDB.csproj", "DataVAPI.ServerDB/"]
  12. COPY ["DataVAPI.Tools/DataVAPI.Tool.csproj", "DataVAPI.Tools/"]
  13. COPY ["DataVAPI.Model/DataVAPI.Model.csproj", "DataVAPI.Model/"]
  14. RUN dotnet restore "DataVAPI/DataVAPI.csproj" --configfile "NuGet.config"
  15. COPY . .
  16. WORKDIR "/src/DataVAPI"
  17. RUN dotnet build "DataVAPI.csproj" -c Release -o /app/build
  18. FROM build AS publish
  19. RUN dotnet publish "DataVAPI.csproj" -c Release -o /app/publish
  20. FROM base AS final
  21. WORKDIR /app
  22. COPY --from=publish /app/publish .
  23. ENTRYPOINT ["dotnet", "DataVAPI.dll"]