Skip to content

Commit 65d7092

Browse files
update initializeCommand definition to match spec (devcontainers#363)
* update initializeCommand definition to match spec (devcontainers/spec#440) * rogue spaces * Update _implementors/json_schema.md Co-authored-by: Samruddhi Khandale <[email protected]> --------- Co-authored-by: Samruddhi Khandale <[email protected]>
1 parent 944d9dc commit 65d7092

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: _implementors/json_reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ When creating or working with a dev container, you may need different commands t
7777

7878
| Property | Type | Description |
7979
|:------------------|:------------|:------------|
80-
| `initializeCommand` | string,<br>array,<br>object | A command string or list of command arguments to run on the **host machine** before the container is created.<br /><br /> ⚠️ The command is run wherever the source code is located on the host. For cloud services, this is in the cloud.<br><br>Note that the array syntax will execute the command without a shell. You can [learn more](#formatting-string-vs-array-properties) about formatting string vs array vs object properties. |
80+
| `initializeCommand` | string,<br>array,<br>object | A command string or list of command arguments to run on the **host machine** during initialization, including during container creation and on subsequent starts. The command may run more than once during a given session.<br /><br /> ⚠️ The command is run wherever the source code is located on the host. For cloud services, this is in the cloud.<br><br>Note that the array syntax will execute the command without a shell. You can [learn more](#formatting-string-vs-array-properties) about formatting string vs array vs object properties. |
8181
| `onCreateCommand` 🏷️ | string,<br>array,<br>object | This command is the first of three (along with `updateContentCommand` and `postCreateCommand`) that finalizes container setup when a dev container is created. It and subsequent commands execute **inside** the container immediately after it has started for the first time.<br /><br> Cloud services can use this command when caching or prebuilding a container. This means that it will not typically have access to user-scoped assets or secrets.<br><br>Note that the array syntax will execute the command without a shell. You can [learn more](#formatting-string-vs-array-properties) about formatting string vs array vs object properties. |
8282
| `updateContentCommand` 🏷️ | string,<br>array,<br>object | This command is the second of three that finalizes container setup when a dev container is created. It executes inside the container after `onCreateCommand` whenever new content is available in the source tree during the creation process.<br><br />It will execute at least once, but cloud services will also periodically execute the command to refresh cached or prebuilt containers. Like cloud services using `onCreateCommand`, it can only take advantage of repository and org scoped secrets or permissions.<br><br>Note that the array syntax will execute the command without a shell. You can [learn more](#formatting-string-vs-array-properties) about formatting string vs array vs object properties. |
8383
| `postCreateCommand` 🏷️ | string,<br>array,<br>object | This command is the last of three that finalizes container setup when a dev container is created. It happens after `updateContentCommand` and once the dev container has been assigned to a user for the first time.<br><br />Cloud services can use this command to take advantage of user specific secrets and permissions.<br><br>Note that the array syntax will execute the command without a shell. You can [learn more](#formatting-string-vs-array-properties) about formatting string vs array vs object properties. |

Diff for: _implementors/json_schema.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ You may review the current devcontainer.json schemas in the spec repo, which inc
205205
"string",
206206
"array"
207207
],
208-
"description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.",
208+
"description": "A command string or list of command arguments to run on the host machine during initialization, including during container creation and on subsequent starts. The command may run more than once during a given session. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.",
209+
209210
"items": {
210211
"type": "string"
211212
}

0 commit comments

Comments
 (0)