#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. FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src COPY ["Ropin.Environmentally.AlarmService/Ropin.Environmentally.AlarmService.csproj", "Ropin.Environmentally.AlarmService/"] COPY ["Ropin.Core.Common/Ropin.Core.Common.csproj", "Ropin.Core.Common/"] COPY ["Ropin.Core.Extensions/Ropin.Core.Extensions.csproj", "Ropin.Core.Extensions/"] COPY ["Ropin.Inspection.Common/Ropin.Inspection.Common.csproj", "Ropin.Inspection.Common/"] COPY ["Ropin.Inspection.Service/Ropin.Inspection.Service.csproj", "Ropin.Inspection.Service/"] COPY ["Ropin.Inspection.Model/Ropin.Inspection.Model.csproj", "Ropin.Inspection.Model/"] COPY ["Ropin.Inspection.Repository/Ropin.Inspection.Repository.csproj", "Ropin.Inspection.Repository/"] COPY ["Ropin.Inspection.Tasks/Ropin.Inspection.Tasks.csproj", "Ropin.Inspection.Tasks/"] RUN dotnet restore "Ropin.Environmentally.AlarmService/Ropin.Environmentally.AlarmService.csproj" COPY . . WORKDIR "/src/Ropin.Environmentally.AlarmService" RUN dotnet build "Ropin.Environmentally.AlarmService.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "Ropin.Environmentally.AlarmService.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "Ropin.Environmentally.AlarmService.dll"]