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/contributing.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Here is a sample:
19
19
| Property | Type | Description |
20
20
|:------------------|:------------|:------------|
21
21
|`image`| string |**Required** when using an image. The name of an image in a container registry ([DockerHub](https://hub.docker.com), [GitHub Container Registry](https://docs.github.com/packages/guides/about-github-container-registry), [Azure Container Registry](https://azure.microsoft.com/services/container-registry/)) that VS Code and other `devcontainer.json` supporting services / tools should use to create the dev container. |
22
-
{: .table .table-bordered .table-responsive}
22
+
{: .table .table-bordered}
23
23
24
24
- PRs to the [schema](https://github.com/microsoft/vscode/blob/main/extensions/configuration-editing/schemas/devContainer.schema.src.json), i.e code or shell scripts demonstrating approaches for implementation.
Copy file name to clipboardExpand all lines: _implementors/features.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ The properties of the file are as follows:
57
57
|`legacyIds`| array | Array of old IDs used to publish this Feature. The property is useful for renaming a currently published Feature within a single namespace. |
58
58
|`deprecated`| boolean | Indicates that the Feature is deprecated, and will not receive any further updates/support. This property is intended to be used by the supporting tools for highlighting Feature deprecation. |
59
59
|`mounts`| object | Defaults to unset. Cross-orchestrator way to add additional mounts to a container. Each value is an object that accepts the same values as the [Docker CLI `--mount` flag](https://docs.docker.com/engine/reference/commandline/run/#mount). The Pre-defined [devcontainerId](/implementors/json_reference#variables-in-devcontainerjson) variable may be referenced in the value. For example:<br />`"mounts": [{ "source": "dind-var-lib-docker", "target": "/var/lib/docker", "type": "volume" }]`|
60
-
{: .table .table-bordered .table-responsive}
60
+
{: .table .table-bordered}
61
61
62
62
(**) The ID must refer to either a Feature (1) published to an OCI registry, (2) a Feature Tgz URI, or (3) a Feature in the local file tree. Deprecated Feature identifiers (i.e GitHub Release) are not supported and the presence of this property may be considered a fatal error or ignored. For [local Features (ie: during development)](../features-distribution#addendum-locally-referenced), you may also depend on other local Features by providing a relative path to the Feature, relative to folder containing the active `devcontainer.json`. This behavior of Features within this property again mirror the `features` object in `devcontainer.json`.
63
63
@@ -73,7 +73,7 @@ The following lifecycle hooks may be declared as properties of `devcontainer-fea
@@ -144,7 +144,7 @@ The options property contains a map of option IDs and their related configuratio
144
144
|`optionId.enum`| array | A strict list of allowed string values. Free-form values are **not** allowed. Omit when using `optionId.proposals`. |
145
145
|`optionId.default`| string or boolean | Default value for the option. |
146
146
|`optionId.description`| string | Description for the option. |
147
-
{: .table .table-bordered .table-responsive}
147
+
{: .table .table-bordered}
148
148
149
149
### <ahref="#user-env-var"name="user-env-var"class="anchor"> User environment variables </a>
150
150
@@ -264,7 +264,7 @@ The `id` format specified dicates how a supporting tool will locate and download
264
264
|`<oci-registry>/<namespace>/<feature>[:<semantic-version>]`| Reference to feature in OCI registry(*) |`ghcr.io/user/repo/go` <br> `ghcr.io/user/repo/go:1` <br> `ghcr.io/user/repo/go:latest`|
265
265
|`https://<uri-to-feature-tgz>`| Direct HTTPS URI to a tarball. |`https://github.com/user/repo/releases/devcontainer-feature-go.tgz`|
266
266
|`./<path-to-feature-dir>`| A relative directory(**) to folder containing a devcontainer-feature.json. |`./myGoFeature`|
267
-
{: .table .table-bordered .table-responsive}
267
+
{: .table .table-bordered}
268
268
269
269
(*) OCI registry must implement the [OCI Artifact Distribution Specification](https://github.com/opencontainers/distribution-spec). Some implementors can be [found here](https://oras.land/implementors/).
Copy file name to clipboardExpand all lines: _implementors/json_reference.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Metadata properties marked with a 🏷️️ can be stored in the `devcontainer.
34
34
|`features`| object | An object of [Dev Container Feature IDs](../../features) and related options to be added into your primary container. The specific options that are available varies by feature, so see its documentation for additional details. For example: <br />`"features": { "ghcr.io/devcontainers/features/github-cli": {} }`|
35
35
|`overrideFeatureInstallOrder`| array | By default, Features will attempt to automatically set the order they are installed based on a `installsAfter` property within each of them. This property allows you to override the Feature install order when needed. For example: <br />`"overrideFeatureInstallОrder": [ "ghcr.io/devcontainers/features/common-utils", "ghcr.io/devcontainers/features/github-cli" ]`|
36
36
|`customizations` 🏷️| object | Product specific properties, defined in [supporting tools](../../supporting)|
37
-
{: .table .table-bordered .table-responsive}
37
+
{: .table .table-bordered}
38
38
39
39
## <ahref="#scenario-specific"name="scenario-specific"class="anchor"> Scenario specific properties </a>
40
40
@@ -55,7 +55,7 @@ The focus of `devcontainer.json` is to describe how to enrich a container for th
55
55
|`workspaceMount`| string | Requires `workspaceFolder` be set as well. Overrides the default local mount point for the workspace when the container is created. Supports the same values as the [Docker CLI `--mount` flag](https://docs.docker.com/engine/reference/commandline/run/#mount). Environment and [pre-defined variables](#variables-in-devcontainerjson) may be referenced in the value. For example: <br />`"workspaceMount": "source=${localWorkspaceFolder}/sub-folder,target=/workspace,type=bind,consistency=cached", "workspaceFolder": "/workspace"`|
56
56
|`workspaceFolder`| string | Requires `workspaceMount` be set. Sets the default path that `devcontainer.json` supporting services / tools should open when connecting to the container. Defaults to the automatic source code mount location. |
57
57
|`runArgs`| array | An array of [Docker CLI arguments](https://docs.docker.com/engine/reference/commandline/run/) that should be used when running the container. Defaults to `[]`. For example, this allows ptrace based debuggers like C++ to work in the container:<br /> `"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ]` . |
58
-
{: .table .table-bordered .table-responsive}
58
+
{: .table .table-bordered}
59
59
60
60
### <ahref="#compose-specific"name="compose-specific"class="anchor"> Docker Compose specific properties </a>
61
61
@@ -65,7 +65,7 @@ The focus of `devcontainer.json` is to describe how to enrich a container for th
65
65
|`service`| string |**Required** when using [Docker Compose](https://docs.docker.com/compose/). The name of the service `devcontainer.json` supporting services / tools should connect to once running. |
66
66
|`runServices`| array | An array of services in your Docker Compose configuration that should be started by `devcontainer.json` supporting services / tools. These will also be stopped when you disconnect unless `"shutdownAction"` is `"none"`. Defaults to all services. |
67
67
|`workspaceFolder`| string | Sets the default path that `devcontainer.json` supporting services / tools should open when connecting to the container (which is often the path to a volume mount where the source code can be found in the container). Defaults to `"/"`. |
@@ -84,7 +84,7 @@ When creating or working with a dev container, you may need different commands t
84
84
|`postStartCommand` 🏷️ | string,<br>array,<br>object | A command to run each time the container is successfully started.<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. |
85
85
|`postAttachCommand` 🏷️ | string,<br>array,<br>object | A command to run each time a tool has successfully attached to the container.<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. |
86
86
|`waitFor` 🏷️ | enum | An enum that specifies the command any tool should wait for before connecting. Defaults to `updateContentCommand`. This allows you to use `onCreateCommand` or `updateContentCommand` for steps that must happen before `devcontainer.json` supporting tools connect while still using `postCreateCommand` for steps that can happen behind the scenes afterwards. |
87
-
{: .table .table-bordered .table-responsive}
87
+
{: .table .table-bordered}
88
88
89
89
For each command property, if the value is a single string, it will be run in `/bin/sh`. Use `&&` in a string to execute multiple commands. For example, `"yarn install"` or `"apt-get update && apt-get install -y curl"`. The array syntax `["yarn", "install"]` will invoke the command (in this case `yarn`) directly without using a shell. Each fires after your source code has been mounted, so you can also run shell scripts from your source tree. For example: `bash scripts/install-dev-tools.sh`.
90
90
@@ -100,7 +100,7 @@ While `devcontainer.json` does not focus on hardware or VM provisioning, it can
100
100
|`hostRequirements.memory` 🏷️ | string | A string indicating minimum memory requirements with a `tb`, `gb`, `mb`, or `kb` suffix. For example, `"hostRequirements": {"memory": "4gb"}`|
101
101
|`hostRequirements.storage` 🏷️ | string | A string indicating minimum storage requirements with a `tb`, `gb`, `mb`, or `kb` suffix. For example, `"hostRequirements": {"storage": "32gb"}`|
102
102
|`hostRequirements.gpu` 🏷️ | boolean,<br>string,<br>object | Indicates if any GPU is required. A boolean indicates if a GPU is required or not. The string `"optional"` indicates that a GPU is used when available, but is not required.<br><br>The object syntax specifies how much GPU resources are required. The `cores` property indicates the minimum number of cores and the `memory` property indicates minimum storage requirements with a `tb`, `gb`, `mb`, or `kb` suffix. For example, `"gpu": { "cores": 1000, "storage": "32gb" }`|
103
-
{: .table .table-bordered .table-responsive}
103
+
{: .table .table-bordered}
104
104
105
105
## <ahref="#port-attributes"name="port-attributes"class="anchor"> Port attributes </a>
106
106
@@ -113,7 +113,7 @@ The `portsAttributes` and `otherPortsAttributes` properties allow you to map def
113
113
|`onAutoForward` 🏷️ | enum | Controls what should happen when a port is auto-forwarded once you've connected to the container. `notify` is the default, and a notification will appear when the port is auto-forwarded. If set to `openBrowser`, the port will be opened in the system's default browser. A value of `openBrowserOnce` will open the browser only once. `openPreview` will open the URL in `devcontainer.json` supporting services' / tools' embedded preview browser. A value of `silent` will forward the port, but take no further action. A value of `ignore` means that this port should not be auto-forwarded at all. |
114
114
|`requireLocalPort` 🏷️ | boolean | Dictates when port forwarding is required to map the port in the container to the same port locally or not. If set to `false`, the `devcontainer.json` supporting services / tools will attempt to use the specified port forward to `localhost`, and silently map to a different one if it is unavailable. If set to `true`, you will be notified if it is not possible to use the same port. Defaults to `false`. |
115
115
|`elevateIfNeeded` 🏷️ | boolean | Forwarding low ports like 22, 80, or 443 to `localhost` on the same port from `devcontainer.json` supporting services / tools may require elevated permissions on certain operating systems. Setting this property to `true` will automatically try to elevate the `devcontainer.json` supporting tool's permissions in this situation. Defaults to `false`. |
116
-
{: .table .table-bordered .table-responsive}
116
+
{: .table .table-bordered}
117
117
118
118
## <ahref="#formatting-string-vs-array-properties"name="formatting-string-vs-array-properties"class="anchor"> Formatting string vs. array properties </a>
119
119
@@ -172,7 +172,7 @@ Variables can be referenced in certain string values in `devcontainer.json` in t
172
172
|`${localWorkspaceFolderBasename}`| Any | Name of the local folder that was opened in the `devcontainer.json` supporting service / tool (that contains `.devcontainer/devcontainer.json`). |
173
173
|`${containerWorkspaceFolderBasename}`| Any | Name of the folder where the workspace files can be found in the container. |
174
174
|`${devcontainerId}`| Any | Allow 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`. |
Copy file name to clipboardExpand all lines: _implementors/templates.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ The properties of the file are as follows:
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
44
| [`optionalPaths`](#optionalPaths) | array | An array of files or directories that tooling may consider "optional" when applying a Template. Directories are indicated with a trailing `/*`, (eg: `.github/*`).
45
-
{: .table .table-bordered .table-responsive}
45
+
{: .table .table-bordered}
46
46
47
47
### <ahref="#options"name="options"class="anchor"> The `options` property</a>
48
48
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:
@@ -68,7 +68,7 @@ The `options` property contains a map of option IDs and their related configurat
68
68
|`optionId.proposals`| array | A list of suggested string values. Free-form values **are** allowed. Omit when using `optionId.enum`. |
69
69
|`optionId.enum`| array | A strict list of allowed string values. Free-form values are **not** allowed. Omit when using `optionId.proposals`. |
70
70
|`optionId.default`| string | Default value for the option. |
71
-
{: .table .table-bordered .table-responsive}
71
+
{: .table .table-bordered}
72
72
73
73
> `Note`: The `options` must be unique for every `devcontainer-template.json`
0 commit comments