Skip to content

#1804 support buildx use of default builder#1805

Merged
rohanKanojia merged 1 commit intofabric8io:masterfrom
TechnologyBrewery:1804-buildx-default-builder
May 30, 2025
Merged

#1804 support buildx use of default builder#1805
rohanKanojia merged 1 commit intofabric8io:masterfrom
TechnologyBrewery:1804-buildx-default-builder

Conversation

@d-ryan-ashcraft
Copy link
Copy Markdown
Contributor

@d-ryan-ashcraft d-ryan-ashcraft commented Jul 23, 2024

Fix #1804

append(cmds, "create", "--driver", "docker-container", "--name", builderName);
if (nodeName != null) {
append(cmds, "--node", nodeName);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Docker does a nice job of providing meaningful error messages if you try to use the default builder with multiple architectures, etc. For instance:

[INFO] DOCKER> ERROR: Multi-platform build is not supported for the docker driver.
[INFO] DOCKER> Switch to a different driver, or turn on the containerd image store, and try again.
[INFO] DOCKER> Learn more at https://docs.docker.com/go/build-multi-platform/
[ERROR] DOCKER> Error status (1) when building

@@ -245,27 +245,31 @@ protected void createDirectory(Path cachePath) {
protected String createBuilder(Path configPath, List<String> buildX, ImageConfiguration imageConfig, BuildDirs buildDirs) throws MojoExecutionException {
BuildXConfiguration buildXConfiguration = imageConfig.getBuildConfiguration().getBuildX();
String builderName = Optional.ofNullable(buildXConfiguration.getBuilderName()).orElse("maven");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Recommend turning ignore whitespace on to better highlight the change

@epwilkins
Copy link
Copy Markdown
Contributor

PR has been rebased on the latest from the main branch, with merge conflicts resolved. Should be good to merge assuming there are no other issues and it passes the workflow checks.

@rohanKanojia
Copy link
Copy Markdown
Member

@epwilkins : Could you please add documentation about this enhancement?

@d-ryan-ashcraft d-ryan-ashcraft force-pushed the 1804-buildx-default-builder branch from 85efa41 to 360e190 Compare May 28, 2025 17:37
@d-ryan-ashcraft
Copy link
Copy Markdown
Contributor Author

Added documentation and resolved SonarQube Quality Gate issue.

@sonarqubecloud
Copy link
Copy Markdown

@rohanKanojia rohanKanojia merged commit 49fa738 into fabric8io:master May 30, 2025
19 checks passed
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.

Cannot use buildx default driver with local (not multiarchitecture) platform builds

3 participants