File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,17 +7,22 @@ ARG TRUTHGATE_GID=1000
77
88FROM ipfs/kubo:${KUBO_VERSION} AS kubo
99
10- FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-resolute AS build
10+ # Compile on the builder's native CPU while targeting the requested image
11+ # architecture. This avoids running the full .NET build under QEMU for ARM64.
12+ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-resolute AS build
13+ ARG TARGETARCH
1114WORKDIR /src
1215
1316COPY TruthGate-Web/TruthGate-Web/TruthGate-Web.csproj TruthGate-Web/TruthGate-Web/
1417COPY TruthGate-Web/TruthGate-Web.Client/TruthGate-Web.Client.csproj TruthGate-Web/TruthGate-Web.Client/
15- RUN dotnet restore TruthGate-Web/TruthGate-Web/TruthGate-Web.csproj
18+ RUN dotnet restore TruthGate-Web/TruthGate-Web/TruthGate-Web.csproj --arch "${TARGETARCH}"
1619
1720COPY . .
1821RUN dotnet publish TruthGate-Web/TruthGate-Web/TruthGate-Web.csproj \
1922 --configuration Release \
23+ --arch "${TARGETARCH}" \
2024 --no-restore \
25+ --no-self-contained \
2126 --output /out \
2227 /p:UseAppHost=false
2328
You can’t perform that action at this time.
0 commit comments