Dockerfile 801 B

123456789101112131415161718192021
  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/core/aspnet:3.1-buster-slim AS base
  3. WORKDIR /app
  4. EXPOSE 80
  5. FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
  6. WORKDIR /src
  7. COPY ["YLShipBuildLandMap.Web/YLShipBuildLandMap.Web.csproj", "YLShipBuildLandMap.Web/"]
  8. RUN dotnet restore "YLShipBuildLandMap.Web/YLShipBuildLandMap.Web.csproj"
  9. COPY . .
  10. WORKDIR "/src/YLShipBuildLandMap.Web"
  11. RUN dotnet build "YLShipBuildLandMap.Web.csproj" -c Release -o /app/build
  12. FROM build AS publish
  13. RUN dotnet publish "YLShipBuildLandMap.Web.csproj" -c Release -o /app/publish
  14. FROM base AS final
  15. WORKDIR /app
  16. COPY --from=publish /app/publish .
  17. ENTRYPOINT ["dotnet", "YLShipBuildLandMap.Web.dll"]