diff --git a/Alchegos.Reviewer.csproj b/Alchegos.Reviewer.csproj index 573d1b2..ac08d7b 100644 --- a/Alchegos.Reviewer.csproj +++ b/Alchegos.Reviewer.csproj @@ -5,9 +5,16 @@ enable enable dotnet-Alchegos.Reviewer-8a0b4c5f-c0f2-4092-a8dc-ed8136e6e8c8 + Linux + + + + .dockerignore + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..73a42bf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base +USER $APP_UID +WORKDIR /app + +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["Alchegos.Reviewer/Alchegos.Reviewer.csproj", "Alchegos.Reviewer/"] +RUN dotnet restore "Alchegos.Reviewer/Alchegos.Reviewer.csproj" +COPY . . +WORKDIR "/src/Alchegos.Reviewer" +RUN dotnet build "Alchegos.Reviewer.csproj" -c $BUILD_CONFIGURATION -o /app/build + +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "Alchegos.Reviewer.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "Alchegos.Reviewer.dll"]