Dockerfile 1.3 KB

1234567891011121314151617181920212223242526
  1. #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
  3. WORKDIR /app
  4. EXPOSE 80
  5. EXPOSE 443
  6. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  7. WORKDIR /src
  8. COPY ["Ropin.Environmentally.VideoService/Ropin.Environmentally.VideoService.csproj", "Ropin.Environmentally.VideoService/"]
  9. COPY ["Ropin.Core.Common/Ropin.Core.Common.csproj", "Ropin.Core.Common/"]
  10. COPY ["Ropin.Inspection.Common/Ropin.Inspection.Common.csproj", "Ropin.Inspection.Common/"]
  11. COPY ["Ropin.Inspection.Model/Ropin.Inspection.Model.csproj", "Ropin.Inspection.Model/"]
  12. COPY ["Ropin.Inspection.Repository/Ropin.Inspection.Repository.csproj", "Ropin.Inspection.Repository/"]
  13. RUN dotnet restore "Ropin.Environmentally.VideoService/Ropin.Environmentally.VideoService.csproj"
  14. COPY . .
  15. WORKDIR "/src/Ropin.Environmentally.VideoService"
  16. RUN dotnet build "Ropin.Environmentally.VideoService.csproj" -c Release -o /app/build
  17. FROM build AS publish
  18. RUN dotnet publish "Ropin.Environmentally.VideoService.csproj" -c Release -o /app/publish /p:UseAppHost=false
  19. FROM base AS final
  20. WORKDIR /app
  21. COPY --from=publish /app/publish .
  22. ENTRYPOINT ["dotnet", "Ropin.Environmentally.VideoService.dll"]