Skip to content

Commit de1fd83

Browse files
committed
fix: add --load flag to docker buildx build
1 parent 7aa80c4 commit de1fd83

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"Projects": [
3+
{
4+
"Name": "AWS.Deploy.CLI",
5+
"Type": "Patch",
6+
"ChangelogMessages": [
7+
"Add the --load flag in docker buildx build because, unlike the standard docker build command, buildx doesn't automatically load the resulting image into the local Docker image store. When using buildx with certain docker drivers (like docker-container), the build process happens in a container, and the resulting image needs to be explicitly loaded into the local image store using --load."
8+
]
9+
}
10+
]
11+
}

src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public async Task BuildContainerImage(CloudApplication cloudApplication, Recomme
6666
if (currentArchitecture != recommendation.DeploymentBundle.EnvironmentArchitecture)
6767
{
6868
var platform = recommendation.DeploymentBundle.EnvironmentArchitecture == SupportedArchitecture.Arm64 ? "linux/arm64" : "linux/amd64";
69-
buildCommand = $"{commandName} buildx build --platform {platform} -t {imageTag} -f \"{dockerFile}\"{buildArgs} .";
69+
buildCommand = $"{commandName} buildx build --load --platform {platform} -t {imageTag} -f \"{dockerFile}\"{buildArgs} .";
7070
}
7171

7272
interactiveService.LogInfoMessage($"Container Execution Directory: {Path.GetFullPath(containerExecutionDirectory)}");

0 commit comments

Comments
 (0)