You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _implementors/features-distribution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Goals include:
17
17
- For users, provide the ability for a user to pin to a particular version (absolute, or semantic version) of a Feature to allow for consistent, repeatable environments.
18
18
- Provide the ability to standardize publishing such that [supporting tools](../../supporting) may implement their own mechanism to aid Feature discoverability as they see fit.
19
19
20
-
> **Tip:** This section covers details on the Features specification. If you are looking for summarized information on creating your own Features, see the [template](https://github.com/devcontainers/feature-template) and [core Features](https://github.com/devcontainers/features) repositories.
20
+
> **Tip:** This section covers details on the Features specification. If you are looking for summarized information on creating your own Features, check out the [quick start](https://github.com/devcontainers/feature-starter) and [core Features](https://github.com/devcontainers/features) repositories.
Copy file name to clipboardExpand all lines: _implementors/features.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,11 @@ index: 5
8
8
9
9
Development container "Features" are self-contained, shareable units of installation code and development container configuration. The name comes from the idea that referencing one of them allows you to quickly and easily add more tooling, runtime, or library "Features" into your development container for you or your collaborators to use.
10
10
11
-
> **Note:** While Features may be installed on top of any base image, the implementation of a Feature might restrict it to a subset of possible base images.
12
-
>
13
-
> For example, some Features may be authored to work with a certain linux distro (e.g. debian-based images that use the `apt` package manager).
14
-
15
11
Feature metadata is captured by a `devcontainer-feature.json` file in the root folder of the feature.
16
12
17
-
> **Tip:** This section covers details on the Features specification. If you are looking for summarized information on creating your own Features, see the [template](https://github.com/devcontainers/feature-template) and [core Features](https://github.com/devcontainers/features) repositories.
13
+
> **Note:** While Features may be installed on top of any base image, the implementation of a Feature might restrict it to a subset of possible base images. For example, some Features may be authored to work with a certain Linux distro (e.g. debian-based images that use the `apt` package manager).
14
+
>
15
+
> This section covers details on the Features specification. If you are looking for summarized information on creating your own Features, check out the [quick start](https://github.com/devcontainers/feature-starter) and [core Features](https://github.com/devcontainers/features) repositories.
@@ -175,11 +173,11 @@ Below is a valid `features` object provided as an example.
175
173
}
176
174
```
177
175
178
-
> Note: The `:latest` version annotation is added implicitly if omitted. To pin to a specific package version ([example](https://github.com/devcontainers/features/pkgs/container/features/go/versions)), append it to the end of the Feature.
176
+
> **Note:** The `:latest` version annotation is added implicitly if omitted. To pin to a specific package version ([example](https://github.com/devcontainers/features/pkgs/container/features/go/versions)), append it to the end of the Feature.
179
177
180
178
An option's value can be provided as either a `string` or `boolean`, and should match what is expected by the feature in the `devcontainer-feature.json` file.
181
179
182
-
As a shorthand, the value of a `feature`can be provided as a single string. This string is mapped to an option called `version`. In the example below, both examples are equivalent.
180
+
As a shorthand, the value of the `features` property can be provided as a single string. This string is mapped to an option called `version`. In the example below, both examples are equivalent.
183
181
184
182
```jsonc
185
183
"features": {
@@ -217,7 +215,7 @@ Tooling that handles releasing Features will not republish Features if that exac
Features can be authored in a number of languages, the most straightforward being bash scripts. If a Feature is authored in a different language information about it should be included in the metadata so that users can make an informed choice about it.
218
+
Features can be authored in a number of languages, the most straightforward being bash scripts. If a Feature is authored in a different language, information about it should be included in the metadata so that users can make an informed choice about it.
221
219
222
220
Reference information about the application required to execute the Feature should be included in `devcontainer-feature.json` in the metadata section.
223
221
@@ -227,7 +225,7 @@ If the Feature is included in a folder as part of the repository that contains `
Copy file name to clipboardExpand all lines: _implementors/json_reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ Variables can be referenced in certain string values in `devcontainer.json` in t
172
172
|`${devcontainerId}`| Any | Identifier derived from a set of container labels that uniquely idenity the dev container on a Docker host. It allows Features to refer to an identifier that is unique to the dev container they are installed into and that is stable across rebuilds.<br> The properties supporting it in devcontainer.json are: `name`, `runArgs`, `initializeCommand`, `onCreateCommand`, `updateContentCommand`, `postCreateCommand`, `postStartCommand`, `postAttachCommand`, `workspaceFolder`, `workspaceMount`, `mounts`, `containerEnv`, `remoteEnv`, `containerUser`, `remoteUser`, and `customizations`. |
You can see the VS Code implementation of the dev container schema [here](https://github.com/microsoft/vscode/blob/main/extensions/configuration-editing/schemas/devContainer.schema.src.json).
Copy file name to clipboardExpand all lines: _implementors/reference.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ This allows you to have a separate **more complex** devcontainer.json you use to
124
124
}
125
125
```
126
126
127
-
Note that you can also opt to you can opt to manually add metadata to an image label instead. These properties will be picked up even if you didn't use the Dev Container CLI to build (and can be updated by the CLI even if you do). For example, consider this Dockerfile snippet:
127
+
Note that you can also opt to manually add metadata to an image label instead. These properties will be picked up even if you didn't use the Dev Container CLI to build (and can be updated by the CLI even if you do). For example, consider this Dockerfile snippet:
Copy file name to clipboardExpand all lines: _implementors/spec.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,6 @@ Certain dev container metadata properties can be stored in an image label as an
36
36
37
37
Metadata should be representative of with the following structure, using one entry per [Dev Container Feature](../features) and devcontainer.json (see table below for the full list):
38
38
39
-
40
39
```json
41
40
[
42
41
{
@@ -62,7 +61,7 @@ The metadata is added to the image as a `devcontainer.metadata` label with a JSO
To apply the metadata together with a user's devcontainer.json at runtime the following merge logic by property is used. The table also notes which properties are currently supported coming from the devcontainer.json and which from the feature metadata, this will change over time as we add more properties.
64
+
To apply the metadata together with a user's devcontainer.json at runtime, the following merge logic by property is used. The table also notes which properties are currently supported coming from the devcontainer.json and from the Feature metadata- this will change over time as we add more properties.
@@ -181,7 +180,7 @@ Users control the permissions of applications executed in the containers, allowi
181
180
***Container User**: The user that will be used for all operations that run inside a container. This concept is native to containers. It may be set in the container image, using the `containerUser` property for **image** and **dockerfile** scenarios, or using an orchestratric specific property like `user` property in Docker Compose files.
182
181
***Remote User**: Used to run the [lifecycle](#lifecycle) scripts inside the container. This is also the user tools and editors that connect to the container should use to run their processes. This concept is not native to containers. Set using the `remoteEnv` property in all cases and defaults to the container user.
183
182
184
-
This separation allows the ENTRYPOINT for the image to execute with different permissions than the developer and allows for developers to switch users without recreating their containers.
183
+
This separation allows the `ENTRYPOINT` for the image to execute with different permissions than the developer and allows for developers to switch users without recreating their containers.
@@ -274,7 +273,7 @@ Like during the create process, remote [environment variables](#environment-vari
274
273
275
274
Dev containers support a single command for each of its lifecycle scripts. While serial execution of multiple commands can be achieved with `;`, `&&`, etc., parallel execution deserves first-class support.
276
275
277
-
All lifecycle scripts have been extended to support `object` types. The key of the `object` will be a unique name for the command and the value will be the `string` or `array` command. Each command must exit successfully for the stage to be considered successful.
276
+
All lifecycle scripts have been extended to support `object` types. The key of the `object` will be a unique name for the command, and the value will be the `string` or `array` command. Each command must exit successfully for the stage to be considered successful.
278
277
279
278
Each entry in the `object` will be run in parallel during that lifecycle step.
Copy file name to clipboardExpand all lines: _implementors/templates-distribution.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
layout: implementors
3
-
title: "Dev Container Templates distribution and discovery [proposal]"
3
+
title: "Dev Container Templates distribution and discovery"
4
4
shortTitle: "Templates distribution"
5
5
author: Microsoft
6
-
index: 10
6
+
index: 8
7
7
---
8
8
9
9
**TL;DR Check out the [quick start repository](https://github.com/devcontainers/template-starter) to get started on distributing your own Dev Container Templates.**
@@ -78,6 +78,7 @@ The `devcontainer-collection.json` is an auto-generated metadata file.
78
78
| :--- | :--- | :--- |
79
79
|`sourceInformation`| object | Metadata from the implementing packaging tool. |
80
80
|`templates`| array | The list of Templates that are contained in this collection.|
81
+
{: .table .table-bordered .table-responsive}
81
82
82
83
Each Template's `devcontainer-template.json` metadata file is appended into the `templates` top-level array.
Development container "Templates" are source files packaged together that encode configuration for a complete development environment. A Template can be used in a new or existing project, and a [supporting tool](/supporting) will use the configuration from the Template to build a development container.
10
10
11
-
The configuration is placed in a [`.devcontainer.json`](/implementors/json_reference#devcontainerjson) which can also reference other files within the Template. Alternatively, `.devcontainer/devcontainer.json` can also be used if the container needs to reference other files, such as a `Dockerfile` or `docker-compose.yml`. A Template can also provide additional source files (eg: boilerplate code or a [lifecycle script](/implementors/json_reference/#lifecycle-scripts).
11
+
The configuration is placed in a [`.devcontainer.json`](/implementors/json_reference#devcontainerjson) which can also reference other files within the Template. Alternatively, `.devcontainer/devcontainer.json` can also be used if the container needs to reference other files, such as a `Dockerfile` or `docker-compose.yml`. A Template can also provide additional source files (eg: boilerplate code or a [lifecycle script](/implementors/json_reference/#lifecycle-scripts)).
12
12
13
13
Template metadata is captured by a `devcontainer-template.json` file in the root folder of the Template.
14
14
@@ -41,6 +41,7 @@ The properties of the file are as follows:
41
41
|`platforms`| array | Languages and platforms supported by the Template. |
42
42
|`publisher`| string | Name of the publisher/maintainer of the Template. |
43
43
|`keywords`| array | List of strings relevant to a user that would search for this Template. |
44
+
{: .table .table-bordered .table-responsive}
44
45
45
46
### <ahref="#options"name="options"class="anchor"> The `options` property</a>
46
47
The `options` property contains a map of option IDs and their related configuration settings. These `options` are used by the supporting tools to prompt the user to choose from different Template configuration options. The tools would replace the option ID with the selected value in all the files (within the sub-directory of the Template). This replacement would happen before dropping the `.devcontainer.json` (or `.devcontainer/devcontainer.json`) and other files (within the sub-directory of the Template) required to containerize your project. See [option resolution](#option-resolution) for more details. For example:
@@ -66,6 +67,7 @@ The `options` property contains a map of option IDs and their related configurat
66
67
|`optionId.proposals`| array | A list of suggested string values. Free-form values **are** allowed. Omit when using `optionId.enum`. |
67
68
|`optionId.enum`| array | A strict list of allowed string values. Free-form values are **not** allowed. Omit when using `optionId.proposals`. |
68
69
|`optionId.default`| string | Default value for the option. |
70
+
{: .table .table-bordered .table-responsive}
69
71
70
72
> `Note`: The `options` must be unique for every `devcontainer-template.json`
71
73
@@ -87,7 +89,7 @@ Tooling that handles releasing Templates will not republish Templates if that ex
@@ -161,7 +163,7 @@ A user tries to add the `java` Template to their project using the [supporting t
161
163
162
164
The supporting tool could then use a string replacer for all the files within the sub-directory of the Template. In this example, `.devcontainer.json` needs to be modified and hence, the inputs can provided to it as follows:
163
165
164
-
```
166
+
```json
165
167
{
166
168
imageVariant:"17-bullseye",
167
169
nodeVersion: "latest",
@@ -173,16 +175,16 @@ The modified `.devcontainer.json` will be as follows:
0 commit comments