Replies: 2 comments 4 replies
-
I would also like to mention it's not currently possible to pass ANY build args when using a combination of {
"image": "mcr.microsoft.com/devcontainers/base",
"features": {
"ghcr.io/devcontainers/features/node:1": "lts"
},
"build": { // ERROR: property build is not allowed
"cacheFrom": "ghcr.io/owner/repo/devcontainer:latest"
}
} As you can see, property |
Beta Was this translation helpful? Give feedback.
0 replies
-
we have the "runArgs" for 'docker run', why can't the same be done for 'docker build' using let's say "buildArgs" ? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently,
build
has an objectargs
which can be used to pass--build-arg
to thedocker build
command.But it is often needed, to also pass other command line arguments, like
--network
or--add-host
. This is currently not possible in an easy way.I see two possibilities:
args
tovars
orvariables
as they just set build-time variables and re-useargs
for the additional cli-arguments. This would be more in-line withrunArgs
but introduces a heavy breaking change.cliArgs
orbuildArgs
(would then bebuild.buildArgs
) to thebuild
section which are then passed todocker build
. This would just be an extension and not break any existing dev-container definitions.This would solve the issue microsoft/vscode-remote-release#3545 which already has almost 100 upvotes.
Beta Was this translation helpful? Give feedback.
All reactions