From 8a27aed09b6f199907460d27cf711ff21401509f Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Wed, 21 Feb 2024 17:58:40 +0200 Subject: [PATCH] Fix --- src/BUTR.Site.NexusMods.Server/Dockerfile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/BUTR.Site.NexusMods.Server/Dockerfile b/src/BUTR.Site.NexusMods.Server/Dockerfile index a2e7b18d..db6cdfd7 100644 --- a/src/BUTR.Site.NexusMods.Server/Dockerfile +++ b/src/BUTR.Site.NexusMods.Server/Dockerfile @@ -11,7 +11,7 @@ COPY ["src/BUTR.Site.NexusMods.Server.ValueObjects.TVO/BUTR.Site.NexusMods.Serve COPY ["src/BUTR.Site.NexusMods.DependencyInjection/BUTR.Site.NexusMods.DependencyInjection.csproj", "src/BUTR.Site.NexusMods.DependencyInjection/"] COPY ["src/nuget.config", "src/"] -RUN dotnet restore "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj"; +RUN dotnet restore "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -c Release; COPY ["src/BUTR.Site.NexusMods.Server/", "src/BUTR.Site.NexusMods.Server/"] COPY ["src/BUTR.Site.NexusMods.Shared/", "src/BUTR.Site.NexusMods.Shared/"] @@ -27,18 +27,7 @@ COPY [".git/refs/heads/", ".git/refs/heads/"] FROM restore AS publish WORKDIR /build -RUN /bin/bash -c 'set -ex && \ - ARCH=`uname -m` && \ - if [[ "$ARCH" == "amd64" || "$ARCH" == "x86_64" ]]; then \ - echo "x86_64" && \ - dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -c Release -o ./output -r linux-x64; \ - elif [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then \ - echo "aarch64" && \ - dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -c Release -o ./output -r linux-arm64; \ - else \ - echo "unknown arch" && \ - dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -c Release -o ./output --os linux --arch $ARCH; \ - fi' +RUN dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -c Release -o /app/publish; #RUN dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" --no-restore -c Release -r linux-x64 -o /app/publish -p:PublishReadyToRun=true;