build: skip dotnet restore and dotnet build

These steps are executed as part of dotnet publish
This commit is contained in:
Oliver Booth 2024-02-27 13:39:11 +00:00
parent b9de8205f6
commit 521d202824
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 0 additions and 2 deletions

View File

@ -15,11 +15,9 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
COPY --from=build-deps /src/OliverBooth/wwwroot /src/OliverBooth/wwwroot
WORKDIR /src
COPY ["OliverBooth/OliverBooth.csproj", "OliverBooth/"]
RUN dotnet restore "OliverBooth/OliverBooth.csproj"
COPY . .
WORKDIR "/src/OliverBooth"
RUN dotnet build "OliverBooth.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "OliverBooth.csproj" -c Release -o /app/publish /p:UseAppHost=false