Skip to content

Commit

Permalink
Use maxcpucount:1 in Dockerfile to avoid files being used by other pr…
Browse files Browse the repository at this point in the history
…ocesses error
  • Loading branch information
calledude committed Dec 23, 2023
1 parent da41914 commit 5bf3e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ RUN dotnet restore Modix.sln
COPY . .

FROM dotnet-build-base AS dotnet-build
RUN dotnet build -c Release --no-restore Modix.sln
RUN dotnet build -maxcpucount:1 -c Release --no-restore Modix.sln

FROM dotnet-build as dotnet-test
RUN dotnet test -c Release --no-build --no-restore Modix.sln

FROM dotnet-build AS publish
RUN dotnet publish -c Release --no-build --no-restore -o /app Modix/Modix.csproj
RUN dotnet publish -maxcpucount:1 -c Release --no-build --no-restore -o /app Modix/Modix.csproj

FROM base AS final
COPY --from=publish /app .
Expand Down

0 comments on commit 5bf3e08

Please sign in to comment.