microsoft / microsoft/vscode-remote-release
Add support for docker buildx bake files
@chrmarti is already working on this.
Since May 2, 2025.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
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 todaybuildx: 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.