Skip to content

Commit 1b099af

Browse files
Merge branch 'devcontainers:gh-pages' into gh-pages
2 parents 9754c75 + 099aea3 commit 1b099af

File tree

9 files changed

+47
-48
lines changed

9 files changed

+47
-48
lines changed

_implementors/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: implementors
33
title: "How to contribute to the Development Container Specification"
44
shortTitle: "Contributing"
55
author: Microsoft
6-
index: 8
6+
index: 9
77
---
88

99
We're excited for your contributions to the Dev Container Specification! This document outlines how you can get involved.

_implementors/features-distribution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Goals include:
1717
- 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.
1818
- Provide the ability to standardize publishing such that [supporting tools](../../supporting) may implement their own mechanism to aid Feature discoverability as they see fit.
1919

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.
2121
2222
## <a href="#source-code" name="source-code" class="anchor"> Source Code </a>
2323

@@ -71,7 +71,7 @@ Features are distributed as tarballs. The tarball contains the entire contents o
7171

7272
The tarball is named `devcontainer-feature-<id>.tgz`, where `<id>` is the Feature's `id` field.
7373

74-
A reference implementation for packaging and distributing Features is provided as a GitHub Action (https://github.com/devcontainers/action).
74+
A reference implementation for packaging and distributing Features is provided as a [GitHub Action](https://github.com/devcontainers/action).
7575

7676
### <a href="#devcontainer-collection-json" name="devcontainer-collection-json" class="anchor"> devcontainer-collection.json </a>
7777

_implementors/features.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ index: 5
88

99
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.
1010

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-
1511
Feature metadata is captured by a `devcontainer-feature.json` file in the root folder of the feature.
1612

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.
1816
1917
## <a href="#folder-structure" name="folder-structure" class="anchor"> Folder Structure </a>
2018

@@ -175,11 +173,11 @@ Below is a valid `features` object provided as an example.
175173
}
176174
```
177175

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.
179177
180178
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.
181179

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.
183181

184182
```jsonc
185183
"features": {
@@ -217,7 +215,7 @@ Tooling that handles releasing Features will not republish Features if that exac
217215

218216
## <a href="#authoring" name="authoring" class="anchor"> Authoring </a>
219217

220-
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.
221219

222220
Reference information about the application required to execute the Feature should be included in `devcontainer-feature.json` in the metadata section.
223221

@@ -227,7 +225,7 @@ If the Feature is included in a folder as part of the repository that contains `
227225

228226
## <a href="#release" name="release" class="anchor"> Release </a>
229227

230-
_For information on distributing Features, see [the dev container features distribution page](../features-distribution)._
228+
_For information on distributing Features, see [the dev container Features distribution page](../features-distribution)._
231229

232230
## <a href="#execution" name="execution" class="anchor"> Execution </a>
233231

_implementors/json_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Variables can be referenced in certain string values in `devcontainer.json` in t
172172
| `${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`. |
173173
{: .table .table-bordered .table-responsive}
174174

175-
## Schema
175+
## <a href="#schema" name="schema" class="anchor"> Schema </a>
176176

177177
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).
178178

_implementors/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ This allows you to have a separate **more complex** devcontainer.json you use to
124124
}
125125
```
126126

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:
128128

129129
```Dockerfile
130130
LABEL devcontainer.metadata='[{ \
@@ -134,4 +134,4 @@ LABEL devcontainer.metadata='[{ \
134134
}]'
135135
```
136136

137-
See [Dev Container metadata reference](../json_reference) for information on which properties are supported.
137+
See the [Dev Container metadata reference](../json_reference) for information on which properties are supported.

_implementors/spec.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Certain dev container metadata properties can be stored in an image label as an
3636

3737
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):
3838

39-
4039
```json
4140
[
4241
{
@@ -62,7 +61,7 @@ The metadata is added to the image as a `devcontainer.metadata` label with a JSO
6261

6362
### <a href="#merge-logic" name="merge-logic" class="anchor"> Merge Logic </a>
6463

65-
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.
6665

6766
| Property | Type/Format | Merge Logic | devcontainer.json | Feature Metadata |
6867
| -------- | ----------- | ----------- | :---------------: | :--------------: |
@@ -181,7 +180,7 @@ Users control the permissions of applications executed in the containers, allowi
181180
* **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.
182181
* **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.
183182

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.
185184

186185
# <a href="#lifecycle" name="lifecycle" class="anchor"> Lifecycle </a>
187186

@@ -203,7 +202,7 @@ The exact steps required to validate configuration can vary based on exactly whe
203202

204203
## <a href="#environment-creation" name="environment-creation" class="anchor"> Environment Creation </a>
205204

206-
The creation process goes through the steps necesarry to go from the user configuration to a working **environment** that is ready to be used.
205+
The creation process goes through the steps necessary to go from the user configuration to a working **environment** that is ready to be used.
207206

208207
### <a href="#initialization" name="initialization" class="anchor"> Initialization </a>
209208

@@ -274,7 +273,7 @@ Like during the create process, remote [environment variables](#environment-vari
274273

275274
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.
276275

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.
278277

279278
Each entry in the `object` will be run in parallel during that lifecycle step.
280279

_implementors/templates-distribution.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
layout: implementors
3-
title: "Dev Container Templates distribution and discovery [proposal]"
3+
title: "Dev Container Templates distribution and discovery"
44
shortTitle: "Templates distribution"
55
author: Microsoft
6-
index: 10
6+
index: 8
77
---
88

99
**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.
7878
| :--- | :--- | :--- |
7979
| `sourceInformation` | object | Metadata from the implementing packaging tool. |
8080
| `templates` | array | The list of Templates that are contained in this collection.|
81+
{: .table .table-bordered .table-responsive}
8182

8283
Each Template's `devcontainer-template.json` metadata file is appended into the `templates` top-level array.
8384

_implementors/templates.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: implementors
3-
title: "Dev Container Templates reference [proposal]"
3+
title: "Dev Container Templates reference"
44
shortTitle: "Templates"
55
author: Microsoft
6-
index: 9
6+
index: 7
77
---
88

99
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.
1010

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)).
1212

1313
Template metadata is captured by a `devcontainer-template.json` file in the root folder of the Template.
1414

@@ -41,6 +41,7 @@ The properties of the file are as follows:
4141
| `platforms` | array | Languages and platforms supported by the Template. |
4242
| `publisher` | string | Name of the publisher/maintainer of the Template. |
4343
| `keywords` | array | List of strings relevant to a user that would search for this Template. |
44+
{: .table .table-bordered .table-responsive}
4445

4546
### <a href="#options" name="options" class="anchor"> The `options` property</a>
4647
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
6667
| `optionId.proposals` | array | A list of suggested string values. Free-form values **are** allowed. Omit when using `optionId.enum`. |
6768
| `optionId.enum` | array | A strict list of allowed string values. Free-form values are **not** allowed. Omit when using `optionId.proposals`. |
6869
| `optionId.default` | string | Default value for the option. |
70+
{: .table .table-bordered .table-responsive}
6971

7072
> `Note`: The `options` must be unique for every `devcontainer-template.json`
7173
@@ -87,7 +89,7 @@ Tooling that handles releasing Templates will not republish Templates if that ex
8789

8890
## <a href="#release" name="release" class="anchor"> Release </a>
8991

90-
_For information on distributing Templates, see [templates-distribution](/implementors/templates-distribution)._
92+
_For information on distributing Templates, see the [Templates distribution doc](/implementors/templates-distribution)._
9193

9294
### <a href="#option-resolution" name="option-resolution" class="anchor"> Option Resolution </a>
9395

@@ -119,7 +121,7 @@ Suppose the `java` Template has the following `options` parameters declared in t
119121
"17",
120122
"11"
121123
],
122-
"default": "17-bullseye"
124+
"default": "17-bullseye"
123125
},
124126
"nodeVersion": {
125127
"type": "string",
@@ -145,14 +147,14 @@ and it has the following `.devcontainer.json` file:
145147

146148
```json
147149
{
148-
"name": "Java",
149-
"image": "mcr.microsoft.com/devcontainers/java:0-${templateOption:imageVariant}",
150-
"features": {
151-
"ghcr.io/devcontainers/features/node:1": {
152-
"version": "${templateOption:nodeVersion}",
153-
"installMaven": "${templateOption:installMaven}"
154-
}
155-
},
150+
"name": "Java",
151+
"image": "mcr.microsoft.com/devcontainers/java:0-${templateOption:imageVariant}",
152+
"features": {
153+
"ghcr.io/devcontainers/features/node:1": {
154+
"version": "${templateOption:nodeVersion}",
155+
"installMaven": "${templateOption:installMaven}"
156+
}
157+
},
156158
// ...
157159
}
158160
```
@@ -161,7 +163,7 @@ A user tries to add the `java` Template to their project using the [supporting t
161163

162164
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:
163165

164-
```
166+
```json
165167
{
166168
imageVariant:"17-bullseye",
167169
nodeVersion: "latest",
@@ -173,16 +175,16 @@ The modified `.devcontainer.json` will be as follows:
173175

174176
```json
175177
{
176-
"name": "Go",
177-
"image": "mcr.microsoft.com/devcontainers/go:0-17-bullseye",
178-
"features": {
179-
"ghcr.io/devcontainers/features/node:1": {
180-
"version": "latest",
181-
"installMaven": "false"
182-
}
183-
},
184-
...
178+
"name": "Go",
179+
"image": "mcr.microsoft.com/devcontainers/go:0-17-bullseye",
180+
"features": {
181+
"ghcr.io/devcontainers/features/node:1": {
182+
"version": "latest",
183+
"installMaven": "false"
184+
}
185+
},
186+
...
185187
}
186188
```
187189

188-
The modified `.devcontainer.json` would be dropped into any existing folder as a starting point for containerizing your project.
190+
The modified `.devcontainer.json` would be dropped into any existing folder as a starting point for containerizing your project.

0 commit comments

Comments
 (0)