Dockerfile 632 B

12345678910111213141516171819202122
  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 ["ERP/ERP.csproj", "ERP/"]
  9. RUN dotnet restore "ERP/ERP.csproj"
  10. COPY . .
  11. WORKDIR "/src/ERP"
  12. RUN dotnet build "ERP.csproj" -c Release -o /app/build
  13. FROM build AS publish
  14. RUN dotnet publish "ERP.csproj" -c Release -o /app/publish /p:UseAppHost=false
  15. FROM base AS final
  16. WORKDIR /app
  17. COPY --from=publish /app/publish .
  18. ENTRYPOINT ["dotnet", "ERP.dll"]