Update
This commit is contained in:
Родитель
21efeacd16
Коммит
50435a57f4
|
@ -39,20 +39,21 @@ We now support connecting to macOS hosts. You don't need to do anything - when y
|
|||
|
||||
The `devContainer.json` file supports additional properties:
|
||||
|
||||
* `initializeCommand` can be used to run a command before building or rebuilding a container. The property can be set to a string that is run in a shell or to an array of strings which are run without a shell.
|
||||
* `initializeCommand` can be used to run a command before building or connecting to a container. The property can be set to a string that is run in a shell or to an array of strings which are run without a shell.
|
||||
|
||||
* `build` allows to define the docker [build target](https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target) and [build arguments](https://docs.docker.com/engine/reference/builder/#arg). It is now also possible to specify the `dockerFile` and `context` properties inside the `build` section (the old location is still supported).
|
||||
* `build` allows to define the docker [build target](https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target) and [build arguments](https://docs.docker.com/engine/reference/builder/#arg). It is now also possible to specify the `dockerfile` (note: all lowercase) and `context` properties inside the `build` section (the old location is still supported).
|
||||
|
||||
Here is an example:
|
||||
|
||||
```json
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": "...",
|
||||
"context": "...",
|
||||
"target": "...",
|
||||
"dockerfile": "../Dockerfile",
|
||||
"context": "..",
|
||||
"target": "development",
|
||||
"args": {
|
||||
"FOO": "BAR"
|
||||
"ARG1": "FOO",
|
||||
"ARG2": "BAR"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче