devcontainers / devcontainers/cli

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

Ouverte
#922 0 commentaires 1 réaction 1 personne assignée Réclamée par @v-Kaniska244 Voir sur GitHub
feature-request
Langage dominant
TypeScript
Étoiles
3k
Forks
457
Merge moyen
13 h 17 min
PR mergées (30 j)
6

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.