FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src #COPY BlueWest/*.csproj ./BlueWest/ #COPY BlueWest.Api/*.csproj ./BlueWest.Api/ #COPY BlueWest.Data/*.csproj ./BlueWest.Data/ # #COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator/ #COPY include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/*.csproj ./include/Math-Expression-Evaluator/SimpleExpressionEvaluator.Tests/ #COPY include/MapTo/src/BlueWest.MapTo/*.csproj ./include/MapTo/src/BlueWest.MapTo/ #COPY include/MapTo/src/BlueWest.MapTo/MapTo.props ./include/MapTo/src/BlueWest.MapTo/ COPY ["BlueWest.Api/BlueWest.Api.csproj", "BlueWest.Api/"] RUN dotnet restore "BlueWest.Api/BlueWest.Api.csproj" COPY . . WORKDIR "/src/BlueWest.Api" RUN dotnet build "BlueWest.Api.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "BlueWest.Api.csproj" -c Release -o /app/publish --self-contained false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "BlueWest.Api.dll"]