microsoft / microsoft/vscode-remote-release

Add support for docker buildx bake files

Open
#10,919 2 comments 20 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since May 2, 2025.

containers feature-request
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 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.