-
Notifications
You must be signed in to change notification settings - Fork 11
Build developers local platform by default #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the build system to differentiate between host and guest artifacts, enabling developers to build artifacts for their local platform by default while maintaining support for guest (Linux) artifacts.
Key changes:
- Introduced
HOST_OSvariable and platform-specific build targets (_host_common,_guest_common) - Modified the default build group to include separate host and guest binary groups
- Updated the Makefile to detect and use the local platform for builds
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docker-bake.hcl | Adds host/guest platform distinction with new variables and target groups, reorganizes default build targets |
| Makefile | Updates platform detection to use lowercase OS names and passes HOST_OS to the build system |
| Dockerfile | Changes cache key from TARGETPLATFORM to explicit TARGETOS/TARGETARCH format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| output = ["${DESTDIR}"] | ||
| } |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The libkrun target is missing an inherits declaration. Since it's part of the guest-binaries group (line 77), it should inherit from _guest_common to ensure consistent platform targeting.
| $(BUILDX) bake | ||
| build: | ||
| @echo "$(WHALE) $@" | ||
| HOST_OS=$(OS) KERNEL_ARCH=$(ARCH) $(BUILDX) bake |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable naming inconsistency: KERNEL_ARCH is used here but TARGETARCH is the standard Docker build argument. Consider renaming to HOST_ARCH for consistency with HOST_OS, or document why a different convention is used.
| HOST_OS=$(OS) KERNEL_ARCH=$(ARCH) $(BUILDX) bake | |
| HOST_OS=$(OS) HOST_ARCH=$(ARCH) $(BUILDX) bake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check this config. Putting this into draft.
|
Superseded by #74 |
This change updates the build to split artifacts into host/guest. By default, build the host artifacts to match the developers local platform.