Skip to content

Commit 0fb6f90

Browse files
kaovilaiclaude
andcommitted
feat: Add multiarch support to csi-snapshot-metadata Dockerfile
Make grpc-health-probe download multiarch-compatible by: - Adding TARGETARCH build argument - Using grpc_health_probe-linux-${TARGETARCH} instead of hardcoded amd64 - Adding --platform=$BUILDPLATFORM to builder stage for cross-compilation This enables building for both linux/amd64 and linux/arm64 platforms. Tested with podman build --platform linux/amd64,linux/arm64 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 09dcb69 commit 0fb6f90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/csi-snapshot-metadata/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
FROM alpine AS builder
1+
FROM --platform=$BUILDPLATFORM alpine AS builder
22
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.37
3-
ADD https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 /bin/grpc_health_probe
3+
ARG TARGETARCH
4+
ADD https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-${TARGETARCH} /bin/grpc_health_probe
45
RUN chmod +x /bin/grpc_health_probe
56

67
FROM gcr.io/distroless/static:latest

0 commit comments

Comments
 (0)