Skip to content

Commit 5f34907

Browse files
authored
Use correct arch (#114)
1 parent 3eabe11 commit 5f34907

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ ENV AZURE_CONFIG_DIR=/app/.azure
1616
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS publish
1717
WORKDIR /src
1818
COPY . .
19-
RUN dotnet publish "AzureCliCredentialProxy.csproj" -c Release -r linux-musl-x64 -o /app/publish
2019

20+
ARG TARGETPLATFORM
21+
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
22+
dotnet publish "AzureCliCredentialProxy.csproj" -c Release -r linux-musl-x64 -o /app/publish; \
23+
else \
24+
dotnet publish "AzureCliCredentialProxy.csproj" -c Release -r linux-musl-arm64 -o /app/publish; \
25+
fi
2126

2227
FROM base AS final
2328
RUN chown -R app /app

0 commit comments

Comments
 (0)