Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1804 support buildx use of default builder #1805

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

d-ryan-ashcraft
Copy link

@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
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
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

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
1 participant