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

docker buildx bake support #21278

Open
msavtchouk-pf opened this issue Aug 7, 2024 · 2 comments
Open

docker buildx bake support #21278

msavtchouk-pf opened this issue Aug 7, 2024 · 2 comments
Labels
backend: Docker Docker backend-related issues enhancement

Comments

@msavtchouk-pf
Copy link

Is your feature request related to a problem? Please describe.
We would like to use https://docs.docker.com/build/bake/ to make our docker build process more efficient.
At the moment we are using pants+docker as described here:
https://www.pantsbuild.org/blog/2021/10/13/pants-pex-and-docker

Describe the solution you'd like
We would like pants to support docker bake, or alternative solution to parallelize builds + caching

Describe alternatives you've considered
Alternative is not to use pants.

@msavtchouk-pf msavtchouk-pf changed the title docker buildx bake support. docker buildx bake support Aug 7, 2024
@huonw huonw added the backend: Docker Docker backend-related issues label Aug 13, 2024
@huonw
Copy link
Contributor

huonw commented Aug 13, 2024

Thanks for filing a feature request.

Pants is entirely volunteer driven. Are you interested in contributing to extend the existing docker backend to support this?

If so, we can definitely try to provide guidance/mentorship!

@lilatomic
Copy link
Contributor

Pants can currently build docker images in parallel if multiple docker target are specified (ex pants package :docker0 :docker1 or pants package ::)

docker buildx bake looks to be a serialisation of the arguments to the docker build. In that way it and Pants are performing the same tasks. One approach would be to use a Synthetic target generator to parse the bake file and generate docker_image targets from it. We'd want to tag them somehow as coming from a Bake file so we could invoke the correct build command. There's already (experimental) support for using podman and separately for using buildx, I wonder if it would make sense to broaden that support for docker buildx bake as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Docker Docker backend-related issues enhancement
Projects
None yet
Development

No branches or pull requests

3 participants