Remove explicit restore step from docker build

This commit is contained in:
Jordan Dominion
2023-07-27 01:47:48 -04:00
parent 1eee2ce9d8
commit efa3d6a47a
+1 -12
View File
@@ -40,22 +40,11 @@ RUN dotnet msbuild -target:NpmBuild
WORKDIR /repo
# Restore nuget packages
COPY tgstation-server.sln ./
COPY src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj src/Tgstation.Server.Host.Console/
COPY src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj src/Tgstation.Server.Host.Watchdog/
COPY src/Tgstation.Server.Api/Tgstation.Server.Api.csproj src/Tgstation.Server.Api/
COPY src/Tgstation.Server.Common/Tgstation.Server.Common.csproj src/Tgstation.Server.Common/
COPY src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj src/Tgstation.Server.Host.Common/
RUN dotnet restore -nowarn:MSB3202,nu1503 -p:RestoreUseSkipNonexistentTargets=false
# Final copy for building
COPY . .
#run dos2unix on tgs.docker.sh so we can build without issue on windows
RUN dos2unix build/tgs.docker.sh
RUN dos2unix build/tgs.docker.sh && dotnet restore
WORKDIR /repo/src/Tgstation.Server.Host.Console
RUN dotnet publish -c Release -o /app