Skip to content

fix: Add --load flag to buildx build command#2514

Merged
skudasov merged 3 commits intomainfrom
jade/fix-buildx-load
Apr 7, 2026
Merged

fix: Add --load flag to buildx build command#2514
skudasov merged 3 commits intomainfrom
jade/fix-buildx-load

Conversation

@jadepark-dev
Copy link
Copy Markdown
Contributor

  • BuildImage was changed from docker build to docker buildx build in fd69a73 to support --secret for private plugin auth
  • With the docker-container buildx driver (created by setup-buildx-action in CI), built images stay in BuildKit's cache and are not loaded into the Docker daemon
  • This causes pull access denied errors when trying to start containers from the locally-built image
  • Adding --load ensures the image is exported from BuildKit cache into the Docker daemon regardless of which buildx driver is active

@jadepark-dev jadepark-dev marked this pull request as ready for review April 7, 2026 19:28
@jadepark-dev jadepark-dev requested a review from a team as a code owner April 7, 2026 19:28
Copilot AI review requested due to automatic review settings April 7, 2026 19:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds --load to the docker buildx build invocation so locally-built images are exported from the BuildKit cache into the Docker daemon, preventing “pull access denied” failures when starting containers from freshly-built images.

Changes:

  • Add --load to the default BuildImage buildx command.
  • Add a changeset entry documenting the behavior change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
framework/docker.go Ensures buildx-built images are loaded into the local Docker daemon by adding --load.
framework/.changeset/v0.15.15.md Documents the change in image build behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread framework/docker.go
Comment on lines 437 to 441
if os.Getenv("GITHUB_TOKEN") != "" {
commandParts = append(commandParts, "--secret", "id=GIT_AUTH_TOKEN,env=GITHUB_TOKEN")
}
commandParts = append(commandParts, "-t", nameAndTag, "-f", dfilePath, dctx)
commandParts = append(commandParts, "--load", "-t", nameAndTag, "-f", dfilePath, dctx)
return RunCommand(commandParts[0], commandParts[1:]...)
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

--load is only added in the non-CTF_CLNODE_DLV branch. The CTF_CLNODE_DLV=true path still runs docker buildx build without --load, so it can still produce images that remain only in the BuildKit cache (and fail to start via Docker daemon). Consider adding --load to the DLV branch as well so both code paths behave consistently.

Copilot uses AI. Check for mistakes.
@skudasov skudasov merged commit 115b509 into main Apr 7, 2026
74 of 76 checks passed
@skudasov skudasov deleted the jade/fix-buildx-load branch April 7, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants