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

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

Open
d-ryan-ashcraft opened this issue Jul 23, 2024 · 0 comments · May be fixed by #1805
Open

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

d-ryan-ashcraft opened this issue Jul 23, 2024 · 0 comments · May be fixed by #1805

Comments

@d-ryan-ashcraft
Copy link

d-ryan-ashcraft commented Jul 23, 2024

Description

Our project would like to use a consistent buildx build both locally and on ci. We believe this is a general pattern that could benefit other projects as well.

Our general setup is as follows:

  • multiple platforms configured (arm64, amd64)
  • build phase is correctly invoking only the local architecture
    • NOTE: uses the maven docker-container buildx driver, resulting in slower builds due to I/O inherent with the docker-container driver. We would like to avoid this extra I/O on local builds.
  • We don't ever run the deploy phase locally - so we never build multiple platforms (and thus don't need the docker-container output later in the docker-maven-plugin's lifecycle)
  • For continuous integration, we use a ci Maven profile that skips the build phase, allowing the multiple platform builds that occur at this time to happen simultaneously (which speeds up most of our docker modules)

We'd like to be able to set the buildx builder-name to be default to allow the use of the default buildx driver on local builds. This has the following benefits:

  • Faster builds due to lower I/O and buildx improvements
  • Better visual output
  • Consistent docker execution with our ci approach (some modules seem to build differently when not using buildx - we have not narrowed down why yet, but it doesn't matter with this proposed change - but suspect we have some buildx-specific features).

We have a simple PR for this change with a corresponding unit test.

Info

  • docker-maven-plugin version : 0.44.0
  • Maven version (mvn -v) : 3.9.6
  • Docker version :
Client:
 Version:           26.1.0-rd
 API version:       1.44 (downgraded from 1.45)
 Go version:        go1.21.9
 Git commit:        cca8e72
 Built:             Tue Apr 23 16:25:03 2024
 OS/Arch:           darwin/arm64
 Context:           default

Server:
 Engine:
  Version:          25.0.5
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.10
  Git commit:       e63daec8672d77ac0b2b5c262ef525c7cf17fd20
  Built:            Sun May 12 07:25:43 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.10
  GitCommit:        4e1fe7492b9df85914c389d1f15a3ceedbb280ac
 runc:
  Version:          1.1.12
  GitCommit:        51d5e94601ceffbbd85688df1c928ecccbfa4685
 docker-init:
  Version:          0.19.0
  GitCommit:
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 a pull request may close this issue.

1 participant