fix: add --load flag to docker buildx build#966
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds the --load flag to the docker buildx build command so that built images are automatically loaded into the local Docker image store when using buildx.
- Update the container build command to include
--loadfor cross-architecture builds - Add a changelog entry describing the new flag
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs | Include --load flag in buildx build command |
| .autover/changes/aeb80c58-0a88-4bcb-9fc4-c23c4045e6ec.json | Add changelog entry for the new --load flag |
Comments suppressed due to low confidence (1)
src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs:69
- Add a unit test to verify that when building cross-architecture images, the generated buildCommand string includes the
--loadflag to prevent regressions.
buildCommand = $"{commandName} buildx build --load --platform {platform} -t {imageTag} -f \"{dockerFile}\"{buildArgs} .";
GarrettBeatty
approved these changes
Jul 15, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #966 +/- ##
==========================================
- Coverage 62.14% 62.10% -0.04%
==========================================
Files 294 294
Lines 10796 10796
Branches 1616 1616
==========================================
- Hits 6709 6705 -4
- Misses 3487 3490 +3
- Partials 600 601 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
normj
approved these changes
Jul 15, 2025
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.
Issue #, if available:
aws/aws-toolkit-visual-studio#521
Description of changes:
Add the
--loadflag indocker buildx buildbecause, unlike the standarddocker buildcommand,buildxdoesn't automatically load the resulting image into the local Docker image store. When usingbuildxwith certain docker drivers (likedocker-container), the build process happens in a container, and the resulting image needs to be explicitly loaded into the local image store using--load.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.