devcontainers / devcontainers/cli

Allow options when building and using an image instead of a Dockerfile

Aperta
#922 0 commenti 1 reazione 1 assegnatario Rivendicata da @v-Kaniska244 Vedi su GitHub
feature-request
Lingua principale
TypeScript
Stelle
3k
Fork
457
Merge medio
13h 17m
PR unite (30g)
6

Descrizione

There is a `build.options` property that allows adding additional command line arguments to the Docker command while building. For example:
```json
{
"build": {
"dockerfile": "Dockerfile",
"options": [
"--add-host=host.docker.internal:host-gateway"
]
},
"features": {
...
}
}
```
This works great. But often the base is just an image and features are just installed while building. So there would be the following:
```json
{
"image": "debian:11",
"build": {
"options": [
"--add-host=host.docker.internal:host-gateway"
]
},
"features": {
...
}
}
```
This unfortunately does not work as `image` and `build are not allowed together. It would be great if either the `options` would work with `image` or the `runArgs` or a separate property would exist to pass additional command line options.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.