Skip to content

Commit c6d7cc5

Browse files
committed
devcontainer help
1 parent 22187aa commit c6d7cc5

4 files changed

Lines changed: 52 additions & 3 deletions

File tree

local/etc/uceap.d/devcontainer_on_create.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ _devcontainer_on_create_desc='Runs when the devcontainer is created'
6464
_devcontainer_on_create_help='
6565
This command implements the `onCreateCommand` lifecycle event for dev containers.
6666
67+
# Usage
68+
69+
Add the following to your `devcontainer.json` file:
70+
71+
``` json
72+
{
73+
"onCreateCommand": "uceap devcontainer-on-create"
74+
}
75+
```
76+
77+
## Description
78+
6779
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.
6880
6981
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.

local/etc/uceap.d/devcontainer_post_create.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,19 @@ _devcontainer_post_create_desc='Runs after the devcontainer is created'
3838
_devcontainer_post_create_help='
3939
This command implements the `postCreateCommand` lifecycle event for dev containers.
4040
41-
This 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.
41+
# Usage
42+
43+
Add the following to your `devcontainer.json` file:
44+
45+
``` json
46+
{
47+
"postCreateCommand": "uceap devcontainer-post-create"
48+
}
49+
```
50+
51+
## Description
52+
53+
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.
4254
4355
Cloud services can use this command to take advantage of user specific secrets and permissions.
4456
'

local/etc/uceap.d/devcontainer_post_start.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,18 @@ _devcontainer_post_start_desc='Runs after the devcontainer is started'
1212
_devcontainer_post_start_help='
1313
This command implements the `postStartCommand` lifecycle event for dev containers.
1414
15-
This is run each time the container is successfully started.
15+
# Usage
16+
17+
Add the following to your `devcontainer.json` file:
18+
19+
``` json
20+
{
21+
"postStartCommand": "uceap devcontainer-post-start"
22+
}
23+
```
24+
25+
## Description
26+
27+
28+
This command is run each time the container is successfully started.
1629
'

local/etc/uceap.d/devcontainer_update_content.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,19 @@ _devcontainer_update_content_desc='Runs when the devcontainer needs to update co
2020
_devcontainer_update_content_help='
2121
This command implements the `updateContentCommand` lifecycle event for dev containers.
2222
23-
This 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.
23+
# Usage
24+
25+
Add the following to your `devcontainer.json` file:
26+
27+
``` json
28+
{
29+
"updateContentCommand": "uceap devcontainer-update-content"
30+
}
31+
```
32+
33+
## Description
34+
35+
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.
2436
2537
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.
2638
'

0 commit comments

Comments
 (0)