diff --git a/src/BUTR.Site.NexusMods.Server/Dockerfile b/src/BUTR.Site.NexusMods.Server/Dockerfile index 81542bae..e12c1b79 100644 --- a/src/BUTR.Site.NexusMods.Server/Dockerfile +++ b/src/BUTR.Site.NexusMods.Server/Dockerfile @@ -2,6 +2,8 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy AS base WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS restore +ARG TARGETPLATFORM + WORKDIR /build COPY ["src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj", "src/BUTR.Site.NexusMods.Server/"] @@ -11,7 +13,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" -r linux-x64; +RUN dotnet restore "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -r linux -a $TARGETPLATFORM; #RUN dotnet restore "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" -r linux-x64 -p:PublishReadyToRun=true; COPY ["src/BUTR.Site.NexusMods.Server/", "src/BUTR.Site.NexusMods.Server/"] @@ -26,8 +28,10 @@ COPY [".git/refs/heads/", ".git/refs/heads/"] FROM restore AS publish +ARG TARGETPLATFORM + WORKDIR /build -RUN dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" --no-restore -c Release -r linux-x64 -o /app/publish; +RUN dotnet publish "src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj" --no-restore -c Release -r linux -a $TARGETPLATFORM -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;