Skip to content

Commit d8da688

Browse files
Updates, fixes given recent spec updates (devcontainers#66)
Co-authored-by: Samruddhi Khandale <[email protected]>
1 parent 1f19036 commit d8da688

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

_implementors/features-distribution.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ author: Microsoft
66
index: 6
77
---
88

9+
**TL;DR Check out the [quick start template](https://github.com/devcontainers/feature-template) to get going on distributing your own Dev Container Features.**
10+
911
This specification defines a pattern where community members and organizations can author and self-publish [Dev Container 'Features'](../features).
1012

1113
Goals include:
@@ -85,7 +87,7 @@ Each Features's `devcontainer-feature.json` metadata file is appended into the `
8587

8688
## <a href="#distribution" name="distribution" class="anchor"> Distribution </a>
8789

88-
There are several supported ways to distribute Features. Distribution is handled by the implementing packaging tool.
90+
There are several supported ways to distribute Features. Distribution is handled by the implementing packaging tool such as the [Dev Container CLI](https://github.com/devcontainers/cli) or [Dev Container Publish GitHub Action](https://github.com/marketplace/actions/dev-container-publish). See the [quick start repository](https://github.com/devcontainers/feature-template) for a full working example.
8991

9092
A user references a distributed Feature in a `devcontainer.json` as defined in ['referencing a feature'](../features#referencing-a-feature).
9193

_implementors/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ We recommend pre-building images with the tools you need rather than creating an
104104

105105
We recommend using the dev container CLI to pre-build your images. Once you've built your image, you can push it to a container registry (like the [Azure Container Registry](https://learn.microsoft.com/azure/container-registry/container-registry-get-started-docker-cli?tabs=azure-cli), [GitHub Container Registry](https://docs.github.com/packages/working-with-a-github-packages-registry/working-with-the-container-registry#pushing-container-images), or [Docker Hub](https://docs.docker.com/engine/reference/commandline/push)) and reference it directly.
106106

107-
#### <a href="#labels" name="labels" class="anchor"> Metadata in image labels (proposal) </a>
107+
#### <a href="#labels" name="labels" class="anchor"> Metadata in image labels</a>
108108

109109
You can include dev container configuration and Feature metadata in prebuilt images via [image labels](https://docs.docker.com/config/labels-custom-metadata/), 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.
110110

_implementors/templates-distribution.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Each sub-directory should be named such that it matches the `id` field of the `d
5656

5757
## <a href="#versioning" name="versioning" class="anchor">Versioning </a>
5858

59-
6059
Each Template is individually [versioned according to the semver specification](https://semver.org/). The `version` property in the respective `devcontainer-template.json` file is parsed to determine if the Template should be republished.
6160

6261
Tooling that handles publishing Templates will not republish Templates if that exact version has already been published; however, tooling must republish major and minor versions in accordance with the semver specification.
@@ -85,14 +84,12 @@ Each Template's `devcontainer-template.json` metadata file is appended into the
8584

8685
## <a href="#distribution" name="distribution" class="anchor"> Distribution </a>
8786

88-
89-
There are several supported ways to distribute Templates. Distribution is handled by the implementing packaging tool.
87+
There are several supported ways to distribute Templates. Distribution is handled by the implementing packaging tool such as the **[Dev Container CLI](https://github.com/devcontainers/cli)** or **[Dev Container Publish GitHub Action](https://github.com/marketplace/actions/dev-container-publish)**.
9088

9189
A user can add a Template in to their projects as defined by the [supporting tools](/supporting#supporting-tools-and-services).
9290

9391
### <a href="#oci-registry" name="oci-registry" class="anchor">OCI Registry</a>
9492

95-
9693
An OCI registry that implements the [OCI Artifact Distribution Specification](https://github.com/opencontainers/distribution-spec) serves as the primary distribution mechanism for Templates.
9794

9895
Each packaged Template is pushed to the registry following the naming convention `<registry>/<namespace>/<id>[:version]`, where version is the major, minor, and patch version of the Template, according to the semver specification.

_implementors/templates.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ A Template's `options` property is used by a supporting tool to prompt for diffe
9797

9898
Consider a `java` Template with the following folder structure:
9999

100+
```
100101
+-- java
101102
| +-- devcontainer-template.json
102103
| +-- .devcontainer.json
104+
```
103105

104106
Suppose the `java` Template has the following `options` parameters declared in the `devcontainer-template.json` file:
105107

_includes/topnav.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ <h1>Development Containers</h1>
1717
<!--<li {% if page.sectionid=='implementors' %} class="nav-item active" {% else %} class="nav-item" {% endif %}>
1818
<a class="nav-link" href="{{ sorted.first.url | prepend: site.baseurl }}">Implementations</a>
1919
</li>-->
20+
<li {% if page.sectionid=='metadata' %} class="nav-item active" {% else %} class="nav-item" {% endif %}>
21+
<a class="nav-link" href="{{ "/implementors/json_reference" | prepend: site.baseurl }}">Metadata</a>
22+
</li>
2023
<li {% if page.sectionid=='implementors' %} class="nav-item active" {% else %} class="nav-item" {% endif %}>
2124
<a class="nav-link" href="{{ sorted.first.url | prepend: site.baseurl }}">Specification</a>
2225
</li>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ <h1>Development Containers</h1>
2727
<div class="col-lg-7" role="navigation" aria-label="Main">
2828
<h2 class="header-light regular-pad">What are Development Containers?</h2>
2929

30-
<p>A development container allows you to use a container as a full-featured development environment. It can be used to run an application, to separate tools, libraries, or runtimes needed for working with a codebase, and to aid in continuous integration and testing. Dev containers can be run locally or remotely, in a private or public cloud.</p>
30+
<p>A Development Container (or Dev Container for short) allows you to use a container as a full-featured development environment. It can be used to run an application, to separate tools, libraries, or runtimes needed for working with a codebase, and to aid in continuous integration and testing. Dev containers can be run locally or remotely, in a private or public cloud.</p>
3131

32-
<p>The Development Containers Specification seeks to find ways to enrich existing formats with common development specific settings, tools, and configuration while still providing a simplified, un-orchestrated single container option – so that they can be used as coding environments or for continuous integration and testing.</p>
32+
<p>The Development Containers Specification seeks to find ways to enrich existing formats with common development specific settings, tools, and configuration while still providing a simplified, un-orchestrated single container option – so that they can be used as coding environments or for continuous integration and testing. Beyond the specification's core metadata, the spec also enables developers to quickly share and reuse container setup steps through [Dev Container Features](./features) and [Templates](./templates). </p>
3333

3434
</div>
3535
<div class="col-lg-5">

overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ sectionid: overview
77
## <a href="#overview" name="overview" class="anchor"> What are development containers? </a>
88
As containerizing production workloads becomes commonplace, more developers are using containers for scenarios beyond deployment, including continuous integration, test automation, and even full-featured coding environments.
99

10-
Each scenario’s needs can vary between simple single container environments to complex, orchestrated multi-container setups. Rather than attempting to create another orchestrator format, the Development Containers Specification seeks to find ways to enrich existing formats with metadata for common development specific settings, tools, and configuration.
10+
Each scenario’s needs can vary between simple single container environments to complex, orchestrated multi-container setups. Rather than attempting to create another orchestrator format, the Development Containers Specification (or Dev Containers Spec for short) seeks to find ways to enrich existing formats with metadata for common development specific settings, tools, and configuration.
1111

1212
### <a href="#metadata-format" name="metadata-format" class="anchor"> A structured metadata format </a>
1313

14-
Like the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) before it, the first format in the specification, [`devcontainer.json`](implementors/json_reference), was born out of necessity. It is a structured JSON with Comments (jsonc) metadata format that tools can use to store any needed configuration required to develop inside of local or cloud-based containerized coding. While this metadata can be persisted in a `devcontainer.json` today, we envision that this same structured data can be embedded in images and other formats -- all while retaining a common object model for consistent processing.
14+
Like the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) before it, the first format in the specification, [`devcontainer.json`](implementors/json_reference), was born out of necessity. It is a structured JSON with Comments (jsonc) metadata format that tools can use to store any needed configuration required to develop inside of local or cloud-based containerized coding.
15+
16+
Since the spec was initally published, Dev Container metadata can now be stored in [image labels](../implementors/spec/#image-metadata) and in reusable chunks of metadata and install scripts known as [Dev Container Features](../features). We envision that this same structured data can be embedded in other formats -- all while retaining a common object model for consistent processing.
1517

1618
### <a href="#Development-vs-production" name="Development-vs-production" class="anchor"> Development vs production </a>
1719

18-
A development container defines an environment in which you develop your application before you are ready to deploy. While deployment and development containers may resemble one another, you may not want to include tools in a deployment image that you use during development.
20+
A Development Container defines an environment in which you develop your application before you are ready to deploy. While deployment and development containers may resemble one another, you may not want to include tools in a deployment image that you use during development.
1921

2022
<img alt="Diagram of inner and outer loop of container-based development" src="img/dev-container-stages.png"/>
2123

0 commit comments

Comments
 (0)