From 1700b9fe74e46fa0f31ee35b9f80c759a2cfc3b8 Mon Sep 17 00:00:00 2001 From: Gino Canessa Date: Fri, 30 Aug 2024 12:38:29 -0500 Subject: [PATCH] Specify docker files to only build .Net 8 targets. --- Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index d032813..9a3e8cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,23 +3,22 @@ WORKDIR /app # Copy everything else and build COPY . ./ -RUN dotnet restore # Build with platform-specific .Net RID RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch linux-x64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch linux-x64; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch linux-arm64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch linux-arm64; \ elif [ "$TARGETPLATFORM" = "windows/x64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch win-x64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch win-x64; \ elif [ "$TARGETPLATFORM" = "windows/arm64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch win-arm64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch win-arm64; \ elif [ "$TARGETPLATFORM" = "darwin/x64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch osx-x64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch osx-x64; \ elif [ "$TARGETPLATFORM" = "darwin/arm64" ]; then \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --arch osx-arm64; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0 --arch osx-arm64; \ else \ - dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out; \ + dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out --framework net8.0; \ fi; #RUN dotnet publish src/fhir-candle/fhir-candle.csproj -c Release -o out