Skip to content

Add support for docker buildx bake files #248002

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

Closed
ccasn opened this issue May 2, 2025 · 2 comments
Closed

Add support for docker buildx bake files #248002

ccasn opened this issue May 2, 2025 · 2 comments
Assignees

Comments

@ccasn
Copy link

ccasn commented May 2, 2025

It would be nice if we could specify a buildx field in the devcontainer.json (similar to the current build field) to point to a docker-bake.hcl file. The Bake files is next generation of build definitions in docker, and is supperior to standard Dockerfiles: https://docs.docker.com/build/bake/reference/

I think the old build scheme with Dockerfiles are perfectly fine and covers 99% of all devcontainers. But when you start to have more complex setups and you want to reuse build configurations between multiple docker images it becomes much easier to maintain with Bake files.

So a suggestion would be that devcontainers (either building directly from a Dockerfile or using a docker-compose.yml) has 2 options:

  • build: what we have today
  • buildx: new feature that can point to a *.hcl file

If buildx is defined a docker buildx bake command in the background instead of normal docker build.

@IllusionMH
Copy link
Contributor

Devcontainers support is provided by an extension, so you should ask for this feature in extensions repo: https://github.com/Microsoft/vscode-remote-release/issues

@ccasn
Copy link
Author

ccasn commented May 2, 2025

Hi @IllusionMH

Ahh good point! I will close the issue here then :)

For reference the new issue is created here: microsoft/vscode-remote-release#10919

@ccasn ccasn closed this as completed May 2, 2025
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

No branches or pull requests

3 participants