mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 05:16:29 +00:00
Update Dockerfile to support multi-architecture builds by using BUILDPLATFORM and TARGETARCH arguments for dotnet publish
This commit is contained in:
+4
-2
@@ -1,7 +1,9 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
ARG TARGETARCH
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -o /app
|
||||
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
|
||||
dotnet publish -c Release -o /app --os linux --arch $arch
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user