Unify node Dockerfile across architectures#12188
Open
hjiawei wants to merge 1 commit intoprojectcalico:masterfrom
Open
Unify node Dockerfile across architectures#12188hjiawei wants to merge 1 commit intoprojectcalico:masterfrom
hjiawei wants to merge 1 commit intoprojectcalico:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates Calico node image builds by removing architecture-specific Dockerfiles and switching to a single node/Dockerfile that relies on docker buildx’s TARGETARCH, bringing ppc64le/s390x onto the same UBI-based build flow as amd64/arm64.
Changes:
- Update
node/Makefileto always build fromnode/Dockerfileinstead ofDockerfile.$(ARCH). - Update
node/Dockerfileto copy arch-specific binaries usingTARGETARCHand make minor copy/link loop adjustments. - Simplify
ARCHESdefaulting inlib.Makefilenow thatDockerfile.<arch>discovery is no longer used; remove legacy arch-specific node Dockerfiles.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| node/Makefile | Switch image deps and build invocation to the unified Dockerfile. |
| node/Dockerfile | Use TARGETARCH for selecting calico-node/mountns binaries; minor refactors to copy/link steps. |
| node/Dockerfile.arm64 | Removed; build logic folded into unified Dockerfile. |
| node/Dockerfile.ppc64le | Removed; build logic folded into unified Dockerfile. |
| node/Dockerfile.s390x | Removed; build logic folded into unified Dockerfile. |
| lib.Makefile | Remove Dockerfile-glob-based arch discovery; set a fixed default ARCHES list. |
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| ## IMAGE_DEPS lists non-Go files the calico/node image depends on. | ||
| IMAGE_DEPS = ./Dockerfile.$(ARCH) $(BUILD_DEPS) | ||
| IMAGE_DEPS = ./Dockerfile $(BUILD_DEPS) |
f88b7db to
152b04b
Compare
Replace four arch-specific Dockerfiles (Dockerfile.amd64, Dockerfile.arm64, Dockerfile.ppc64le, Dockerfile.s390x) with a single unified Dockerfile that uses the TARGETARCH build arg from docker buildx. This brings ppc64le and s390x to parity with amd64/arm64 by switching them from Alpine-based images to the UBI-based multi-stage build (AlmaLinux for runit/iptables-legacy, UBI minimal for runtime, scratch for final image). Also simplify the ARCHES detection in lib.Makefile by removing the Dockerfile-glob-based discovery logic, since no components use the Dockerfile.<arch> naming pattern anymore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
152b04b to
12d1334
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace four arch-specific Dockerfiles (Dockerfile.amd64, Dockerfile.arm64, Dockerfile.ppc64le, Dockerfile.s390x) with a single unified Dockerfile that uses the TARGETARCH build arg from docker buildx.
This brings ppc64le and s390x to parity with amd64/arm64 by switching them from Alpine-based images to the UBI-based multi-stage build (AlmaLinux for runit/iptables-legacy, UBI minimal for runtime, scratch for final image).
Also simplify the ARCHES detection in lib.Makefile by removing the Dockerfile-glob-based discovery logic, since no components use the Dockerfile. naming pattern anymore.
Release note: