Skip to content

add --load flag to docker buildx build - #2452

Open
fmuyassarov wants to merge 1 commit into
kubernetes-sigs:masterfrom
Nordix:devel/buildkit-load
Open

add --load flag to docker buildx build#2452
fmuyassarov wants to merge 1 commit into
kubernetes-sigs:masterfrom
Nordix:devel/buildkit-load

Conversation

@fmuyassarov

@fmuyassarov fmuyassarov commented Mar 2, 2026

Copy link
Copy Markdown
Member

Export the built image to the local Docker daemon so it is available for subsequent steps, example docker images. By default, buildx builds images using BuildKit and leaves the result in the build cache without exporting it anywhere.

Note: building images for multi arch with --loadparameter is now supported and fixed in docker buildx. See docker/buildx#59.

Export the built image to the local Docker daemon so it is
available for subsequent steps, example docker images. By
default, buildx builds images using BuildKit and leaves the
result in the build cache without exporting it anywhere.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@est.tech>
@k8s-ci-robot
k8s-ci-robot requested review from jjacobelli and kad March 2, 2026 10:25
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 2, 2026
@fmuyassarov

Copy link
Copy Markdown
Member Author

/cc @marquiz

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 2, 2026
@k8s-ci-robot
k8s-ci-robot requested a review from marquiz March 2, 2026 10:25
@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 628589b
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-nfd/deploys/69a5659838302c0008ff8a73
😎 Deploy Preview https://deploy-preview-2452--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fmuyassarov

Copy link
Copy Markdown
Member Author

/test pull-node-feature-discovery-build-image-cross-generic

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@fmuyassarov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-node-feature-discovery-build-image-cross-generic 628589b link true /test pull-node-feature-discovery-build-image-cross-generic

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@fmuyassarov

Copy link
Copy Markdown
Member Author

well, I guess we need the Prow infra to bump their docker before we move on :)

@ozhuraki ozhuraki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, in case you decide to move with docker upgrade

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fmuyassarov, ozhuraki
Once this PR has been reviewed and has the lgtm label, please assign arangogutierrez for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ArangoGutierrez ArangoGutierrez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding --load to image-all fixes a real local-dev annoyance — today the multi-arch build result stays in the buildx cache and never shows up in docker images. The blocker is that multi-arch --load requires the containerd image store in the daemon, so the required cross-build Prow job fails (details inline) and waiting for a generic docker bump may not resolve it; an opt-in flag would keep CI green without depending on infra. Separately, docs/developer-guide/index.md (lines 58-60) still says docker cannot load manifest-lists and links the same buildx#59 this PR drops from the Makefile — that paragraph should be updated here too. Not mergeable as-is with the required job red; good to go once the flag is opt-in (or Prow's daemon actually supports containerd-store loads) and the doc is refreshed.

Comment thread Makefile
# --load : not implemented yet, see: https://github.com/docker/buildx/issues/59
$(IMAGE_BUILDX_CMD) $(IMAGE_BUILD_ARGS) $(IMAGE_BUILD_ARGS_FULL)
$(IMAGE_BUILDX_CMD) $(IMAGE_BUILD_ARGS) $(IMAGE_BUILD_ARGS_MINIMAL)
$(IMAGE_BUILDX_CMD) --load $(IMAGE_BUILD_ARGS) $(IMAGE_BUILD_ARGS_FULL)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-arch --load only works when the daemon runs the containerd image store (recent engines default to it on fresh installs only), which is exactly what the required pull-node-feature-discovery-build-image-cross-generic job hits — scripts/test-infra/build-image-cross.sh runs this target with IMAGE_ALL_PLATFORMS=linux/amd64,linux/arm64. Rather than waiting on Prow infra, consider making this opt-in: an empty-default IMAGE_BUILDX_LOAD ?= variable referenced here, or simply document make image-all IMAGE_BUILD_EXTRA_OPTS=--load, which already works today against a containerd-store daemon. Opt-in also spares the default 5-platform build from exporting every arch variant of both images into the local daemon.

@ArangoGutierrez

Copy link
Copy Markdown
Contributor

/assign @ArangoGutierrez
/unassign @marquiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants