Skip to content

Commit

Permalink
Specify docker files to only build .Net 8 targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
GinoCanessa committed Aug 30, 2024
1 parent 92990f6 commit 1700b9f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1700b9f

Please sign in to comment.