Skip to content

Commit 638a8e0

Browse files
bamurtaughbamurtaugh
and
bamurtaugh
authored
Move proposals and add documentation (devcontainers#339)
* Move finalized proposals * Update specs and readmes * Polish --------- Co-authored-by: bamurtaugh <[email protected]>
1 parent b17c0df commit 638a8e0

17 files changed

+118
-23
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A GitHub Action and an Azure DevOps Task are available in [devcontainers/ci](htt
2020

2121
You may review the specification in the [docs/specs folder](https://github.com/devcontainers/spec/tree/main/docs/specs) of this repo.
2222

23-
You may also review proposed references in the [proposals folder](https://github.com/devcontainers/spec/tree/main/proposals).
23+
You may also review active proposals in the [proposals folder](https://github.com/devcontainers/spec/tree/main/proposals).
2424

2525
Images used in this repo will be contained in the [images folder](/images). The icon for the [dev container GitHub org](https://github.com/devcontainers) is from the [Fluent icon library](https://github.com/microsoft/fluentui-system-icons/blob/master/assets/Cube/SVG/ic_fluent_cube_32_filled.svg).
2626

docs/README.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
# Documentation
1+
# Specification Documentation
22

3-
Documentation and reference material about development containers and the dev container CLI.
3+
The files in this folder detail the Dev Container Specification.
4+
5+
We add any proposal to the [**proposals folder**](https://github.com/devcontainers/spec/tree/main/proposals), only if the proposal is accepted. It stays in that folder until the implementation is in progress. Once code/schema changes are released, we move it into the [**specs folder**](https://github.com/devcontainers/spec/tree/main/docs/specs).
6+
7+
> **Note:** Our [contributing.md](/contributing.md) documents guidelines on contributing to the spec, as well as labels (proposal and finalization) defined for this process for GitHub issues.
8+
9+
There are several main specs in this folder, outlining the key top-level behavior of dev containers, Templates, and Features:
10+
11+
* [Main dev container spec](/docs/specs/devcontainer-reference.md)
12+
* [Dev container metadata reference](/docs/specs/devcontainerjson-reference.md)
13+
* [Main Templates spec](/docs/specs/devcontainer-templates.md)
14+
* [Templates distribution spec](/docs/specs/devcontainer-templates-distribution.md)
15+
* [Main Features spec](/docs/specs/devcontainer-features.md)
16+
* [Features distribution spec](/docs/specs/devcontainer-features-distribution.md)
17+
* [Tools that support the spec](/docs/specs/supporting-tools.md)
18+
19+
The remainder of the files in this folder outline specifications for specific dev container behaviors. Each file includes links to when the proposal was first discussed and when it was merged into the Dev Container CLI or schema.

proposals/declarative-secrets.md renamed to docs/specs/declarative-secrets.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Declarative Secrets
22

3-
## Motiviation
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/198, https://github.com/devcontainers/spec/issues/216
5+
* Schema PR: https://github.com/devcontainers/spec/pull/303
6+
7+
Below is the original proposal.
8+
9+
## Motivation
410

511
Various projects exist in the wild that require various secrets for them to run properly. Examples include:
612

proposals/devcontainer-id-variable.md renamed to docs/specs/devcontainer-id-variable.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Dev Container ID
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/62
5+
* CLI PR: https://github.com/devcontainers/cli/pull/242
6+
7+
Below is the original proposal.
8+
19
## Goal
210

311
Allow features to refer to an identifier that is unique to the dev container they are installed into and that is stable across rebuilds.

proposals/devcontainer-lockfile.md renamed to docs/specs/devcontainer-lockfile.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Lockfiles
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/236
5+
* CLI PR: https://github.com/devcontainers/cli/issues/564
6+
7+
Below is the original proposal.
8+
19
## Goal
210

311
Introduce a lockfile that records the exact version, download information and checksums for each feature listed in the devcontainer.json.

docs/specs/devcontainer-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Dev container specification
1+
# Dev Container Specification
22

33
The purpose of the **Development Container Specification** is to provide a way to enrich containers with the content and metadata necessary to enable development inside them. These container **environments** should be easy to use, create, and recreate.
44

docs/specs/devcontainerjson-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Dev Container metadata reference
1+
# Dev Container Metadata Reference
22

33
The `devcontainer.json` file contains any needed metadata and settings required to configurate a **development container** for a given well-defined tool and runtime stack. It can be used by [tools and services that support the dev container spec](supporting-tools.md) to create a **development environment** that contains one or more **development containers**.
44

proposals/feature-dependencies.md renamed to docs/specs/feature-dependencies.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Feature Dependencies
22

3-
Reference: https://github.com/devcontainers/spec/issues/109
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/109
5+
* CLI PR: https://github.com/devcontainers/cli/commit/236b85162a945a1af9e72fcbe02eb5c7c864b31d
46

5-
**NOTE**: A reference implementation was introduced in https://github.com/devcontainers/cli/commit/236b85162a945a1af9e72fcbe02eb5c7c864b31d
7+
Below is the original proposal.
68

79
## Motivation
810

proposals/features-contribute-lifecycle-scripts.md renamed to docs/specs/features-contribute-lifecycle-scripts.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# [Proposal] Allow Dev Container Features to contribute lifecycle scripts
1+
# Allow Dev Container Features to contribute lifecycle scripts
22

3-
Related to: https://github.com/devcontainers/spec/issues/60, https://github.com/devcontainers/spec/issues/181
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/60, https://github.com/devcontainers/spec/issues/181
5+
* CLI PR: https://github.com/devcontainers/cli/pull/390
6+
7+
Below is the original proposal.
48

59
## Goal
610

proposals/features-legacyIds-deprecated-properties.md renamed to docs/specs/features-legacyIds-deprecated-properties.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
Goal: Adds support for renaming and deprecating a Feature.
1+
# Renaming and Deprecating Features
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/146
5+
* CLI PR: https://github.com/devcontainers/cli/pull/346, https://github.com/devcontainers/cli/pull/335
6+
7+
Below is the original proposal.
8+
9+
## Goal
10+
11+
Adds support for renaming and deprecating a Feature.
212

313
Adding two new properties to the [devcontainer-feature.json](../docs/specs/devcontainer-features.md#devcontainer-featurejson-properties) 👇
414

5-
# 1. legacyIds
15+
## 1. legacyIds
616

717
| Property | Type | Description |
818
| :--- | :--- | :--- |
919
| `legacyIds` | array | Defaults to `[]`. Array of old IDs used to publish this Feature. The property is useful for renaming a currently published Feature within a single namespace. |
1020

11-
## Steps to rename a Feature
21+
### Steps to rename a Feature
1222

1323
1. Update the Feature [source code](../docs/specs/features-distribution/#source-code) folder and the `id` property in the [devcontainer-feature.json properties](../docs/specs/devcontainer-features.md#devcontainer-featurejson-properties) to reflect the new `id`. Other properties (`name`, `documentationUrl`, etc.) can optionally be updated during this step.
1424
2. Add or update the `legacyIds` property to the Feature, including the previously used `id`.
1525
3. Bump the semantic version of the Feature.
1626
4. Rerun the `devcontainer features publish` command, or equivalent tool that implements the [Features distribution specification](../docs/specs/features-distribution/#distribution).
1727

18-
### Example: Renaming a Feature
28+
#### Example: Renaming a Feature
1929

2030
Let's say we currently have a `docker-from-docker` Feature 👇
2131

@@ -48,24 +58,24 @@ We'd want to rename this Feature to `docker-outside-of-docker`. The source code
4858

4959
**Note** - The semantic version of the Feature defined by the `version` property should be **continued** and should not be restarted at `1.0.0`.
5060

51-
### Changes to the Features distribution specification
61+
#### Changes to the Features distribution specification
5262

5363
- [Tools implementing the Dev Container Features Distribution Specification](../docs/specs/features-distribution/#distribution) (eg: [Dev Container CLI](https://github.com/devcontainers/cli) and [Dev Container Publish GitHub Action](https://github.com/marketplace/actions/dev-container-publish)) will dual publish the old `id`s (defined by the `legacyIds` property), and the new `id`.
5464
- The [putManifestWithTags](https://github.com/devcontainers/cli/blob/main/src/spec-configuration/containerCollectionsOCIPush.ts#L172) will be modified. The same `tgz` file for the `id` will be pushed to the `id`s mentioned by the `legacyIds` property for all the [tags](https://github.com/devcontainers/cli/blob/main/src/spec-configuration/containerCollectionsOCIPush.ts#L175).
5565

56-
### Supporting backwards compatibility for [`installsAfter`](../docs/specs/devcontainer-features.md#2-the-installsafter-feature-property) property
66+
#### Supporting backwards compatibility for [`installsAfter`](../docs/specs/devcontainer-features.md#2-the-installsafter-feature-property) property
5767

5868
- Currently the `installsAfter` property is defined as an array consisting of the Feature `id` that should be installed before the given Feature.
5969
- The Feature to be renamed could be already defined by other Feature authors in their `installsAfter` property. Renaming the `id` could change the installation order for them if the `installsAfter` property is not updated with the new `id`. In order to avoid this unexpected behavior and to support back compat, the CLI tooling will be updated to also look at the `legacyIds` property along with the `id` for determining the installation order.
6070

61-
### Supporting tools
71+
#### Supporting tools
6272

6373
This property can be used by the supporting tools to indicate Feature rename in few ways
6474
- [Dev Container Publish GitHub Action](https://github.com/devcontainers/action) which auto-generates the README files can add a note with a list of old `id`s which were used to publish this Feature.
6575
- In the scenarios where Dev Configs are referencing the old `id`s, the VS Code extension hints could be enhanced to deliver this warning that the `id` was renamed to a new one.
6676
- The [containers.dev/features](https://containers.dev/features) website, and [supporting tools](https://containers.dev/supporting) like [VS Code Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and [GitHub Codespaces](https://github.com/features/codespaces) wouldn't list the old `id`, instead list the new `id` of Features.
6777

68-
# 2. deprecated
78+
## 2. deprecated
6979

7080
| Property | Type | Description |
7181
| :--- | :--- | :--- |

proposals/features-user-env-variables.md renamed to docs/specs/features-user-env-variables.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# User Env Variables for Features
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/91
5+
* CLI PR: https://github.com/devcontainers/cli/pull/228
6+
7+
Below is the original proposal.
8+
19
## Goal
210

311
Feature scripts run as the `root` user and sometimes need to know which user account the dev container will be used with.

proposals/gpu-host-requirement.md renamed to docs/specs/gpu-host-requirement.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# GPU host requirement
1+
# GPU Host Requirement
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/82
5+
* CLI PR: https://github.com/devcontainers/cli/pull/173
6+
7+
Below is the original proposal.
28

39
## Goal
410

proposals/image-metadata.md renamed to docs/specs/image-metadata.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Image Metadata
22

3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/18
5+
* CLI PR: https://github.com/devcontainers/cli/pull/188
6+
7+
Below is the original proposal.
8+
39
## Goal
410

511
Record dev container config and feature metadata in prebuilt images, such that, the image and the built-in features can be used with a devcontainer.json (image-, Dockerfile- or Docker Compose-based) that does not repeat the dev container config or feature metadata. Other tools should be able to record the same metadata without necessarily using features themselves.

proposals/parallel-lifecycle-script-execution.md renamed to docs/specs/parallel-lifecycle-script-execution.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
# Parallel lifecycle script execution
1+
# Parallel Lifecycle Script Execution
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/83
5+
* CLI PR: https://github.com/devcontainers/cli/pull/172
6+
7+
Below is the original proposal.
8+
9+
## Goal
210

311
Support executing multiple lifecycle scripts in parallel by providing them in `object` form.
412

513
## Motivation
614

7-
Devcontainers supports a single command for each of its lifecycle scripts. While serial execution of multiple commands can be achieved with `;`, `&&`, etc. parallel is less straightforward and so deserves first-class support.
15+
Dev containers support a single command for each of their lifecycle scripts. While serial execution of multiple commands can be achieved with `;`, `&&`, etc. parallel is less straightforward and so deserves first-class support.
816

917
## Spec changes
1018

proposals/secrets-support.md renamed to docs/specs/secrets-support.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# First class secrets support in dev containers implementations
1+
# First Class Secrets Support
2+
3+
This has now been implemented:
4+
* Discussion issue: https://github.com/devcontainers/spec/issues/219
5+
* CLI PR: https://github.com/devcontainers/cli/pull/493
6+
7+
Below is the original proposal.
28

39
## What are secrets
410
Secrets are variables that hold sensitive values and need to be handled securely at all times (API keys, passwords etc.). Users can change a secret's value at any time, and a conforming dev containers implementation should support dynamically changing secrets without having to rebuild the container.

docs/specs/supporting-tools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Supporting tools and services
1+
# Supporting Tools and Services
22

33
**Note: For the latest set of supporting tools, please check out https://containers.dev/supporting.**
44

proposals/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Proposals
2+
3+
The files in this folder detail active proposals to the Dev Container Specification.
4+
5+
We add any proposal to the [**proposals folder**](https://github.com/devcontainers/spec/tree/main/proposals), only if the proposal is accepted. It stays in that folder until the implementation is in progress. Once code/schema changes are released, we move it into the [**specs folder**](https://github.com/devcontainers/spec/tree/main/docs/specs).
6+
7+
> **Note:** Our [contributing.md](/contributing.md) documents guidelines on contributing to the spec, as well as labels (proposal and finalization) defined for this process for GitHub issues.

0 commit comments

Comments
 (0)