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
Features are individually versioned by the `version` attribute in a Feature's `devcontainer-feature.json`. Features are versioned according to the semver specification. More details can be found in [the dev container Feature specification](https://containers.dev/implementors/features/#versioning).
26
-
27
-
### Publishing
28
-
29
-
> NOTE: The Distribution spec can be [found here](https://containers.dev/implementors/features-distribution/).
30
-
>
31
-
> While any registry [implementing the OCI Distribution spec](https://github.com/opencontainers/distribution-spec) can be used, this template will leverage GHCR (GitHub Container Registry) as the backing registry.
32
-
33
-
Features are meant to be easily sharable units of dev container configuration and installation code.
34
-
35
-
This repo contains a **GitHub Action**[workflow](.github/workflows/release.yaml) that will publish each Feature to GHCR.
36
-
37
-
*Allow GitHub Actions to create and approve pull requests* should be enabled in the repository's `Settings > Actions > General > Workflow permissions` for auto generation of `src/<feature>/README.md` per Feature (which merges any existing `src/<feature>/NOTES.md`).
38
-
39
-
By default, each Feature will be prefixed with the `<owner/<repo>` namespace. For example, the two Features in this repository can be referenced in a `devcontainer.json` with:
40
-
41
-
```
42
-
ghcr.io/devcontainers/feature-starter/color:1
43
-
ghcr.io/devcontainers/feature-starter/hello:1
44
-
```
45
-
46
-
The provided GitHub Action will also publish a third "metadata" package with just the namespace, eg: `ghcr.io/devcontainers/feature-starter`. This contains information useful for tools aiding in Feature discovery.
47
-
48
-
'`devcontainers/feature-starter`' is known as the feature collection namespace.
49
-
50
-
### Marking Feature Public
51
-
52
-
Note that by default, GHCR packages are marked as `private`. To stay within the free tier, Features need to be marked as `public`.
53
-
54
-
This can be done by navigating to the Feature's "package settings" page in GHCR, and setting the visibility to 'public`. The URL may look something like:
If you'd like your Features to appear in our [public index](https://containers.dev/features) so that other community members can find them, you can do the following:
65
-
66
-
* Go to [github.com/devcontainers/devcontainers.github.io](https://github.com/devcontainers/devcontainers.github.io)
67
-
* This is the GitHub repo backing the [containers.dev](https://containers.dev/) spec site
68
-
* Open a PR to modify the [collection-index.yml](https://github.com/devcontainers/devcontainers.github.io/blob/gh-pages/_data/collection-index.yml) file
69
-
70
-
This index is from where [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) surface Features for their dev container creation UI.
71
-
72
-
#### Using private Features in Codespaces
73
-
74
-
For any Features hosted in GHCR that are kept private, the `GITHUB_TOKEN` access token in your environment will need to have `package:read` and `contents:read` for the associated repository.
75
-
76
-
Many implementing tools use a broadly scoped access token and will work automatically. GitHub Codespaces uses repo-scoped tokens, and therefore you'll need to add the permissions in `devcontainer.json`
77
-
78
-
An example `devcontainer.json` can be found below.
0 commit comments