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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
buildhas an objectargswhich can be used to pass--build-argto thedocker buildcommand.But it is often needed, to also pass other command line arguments, like
--networkor--add-host. This is currently not possible in an easy way.I see two possibilities:
argstovarsorvariablesas they just set build-time variables and re-useargsfor the additional cli-arguments. This would be more in-line withrunArgsbut introduces a heavy breaking change.cliArgsorbuildArgs(would then bebuild.buildArgs) to thebuildsection 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