Closed darkvertex closed 1 year ago
We use
buildx build
by default and fall back tobuild
whenbuildx
is not installed.docker-compose
v2 appears to usebuildx build
in its recent versions.@Aposhian Not currently. Support for build CLI options is tracked as #3545.
Is there anything you were looking for getting from using BuildKit that would not be covered by adding build CLI options (#3545)? (Trying to find out if we can close this issue.)
Really need this issue. Trying to use these variables which are only in the newer buildkit. https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
Would be nice to be able to overwrite the build command that is run or something just to get around hurdles like these.
@aguckenber-chwy See https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope.
We use BuildKit automatically if it is available (which seems to become the default with newer installations). That should make a flag in the devcontainer.json unnecessary and I will close this issue. Please open new issues for other BuildKit-related requests/bugs. Thanks!
This is technically a dupe of https://github.com/microsoft/vscode-remote-release/issues/87 but since the other issue was closed and further commenting disallowed, I could not continue there.
Buildkit is great and very useful and right now if my Dockerfile absolutely needs it to build, it's great that I can control the
runArgs
in the devcontainer.json but it won't setDOCKER_BUILDKIT=1
for me at build time, so I need to remember to export that env var prior to launching vscode or my dev container won't build. It's not very ergonomic.I found this doc page that suggests adding env vars by modifying the
runArgs
but from what I can tell that's only good for passing env vars todocker run
, not setting them fordocker build
: https://code.visualstudio.com/docs/remote/containers-advanced#_adding-environment-variablesIn the
devcontainer.json
, I would love either:a)
"use_buildkit": true
or similar. b) or something to set the env for thedocker build
call, maybe:Thoughts?