{"id":14069477,"url":"https://github.com/devcontainers/template-starter","last_synced_at":"2025-07-30T05:32:17.337Z","repository":{"id":64863334,"uuid":"561048626","full_name":"devcontainers/template-starter","owner":"devcontainers","description":"A template explaining how to author custom dev container Templates","archived":false,"fork":false,"pushed_at":"2025-06-05T15:39:53.000Z","size":32,"stargazers_count":206,"open_issues_count":7,"forks_count":76,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-05T16:39:46.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devcontainers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-02T20:41:03.000Z","updated_at":"2025-06-05T15:39:55.000Z","dependencies_parsed_at":"2024-01-14T04:57:16.052Z","dependency_job_id":"5861049d-009d-4529-aa72-6ac7db03ce17","html_url":"https://github.com/devcontainers/template-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/devcontainers/template-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcontainers%2Ftemplate-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcontainers%2Ftemplate-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcontainers%2Ftemplate-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcontainers%2Ftemplate-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devcontainers","download_url":"https://codeload.github.com/devcontainers/template-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devcontainers%2Ftemplate-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267815187,"owners_count":24148356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:59.121Z","updated_at":"2025-07-30T05:32:17.322Z","avatar_url":"https://github.com/devcontainers.png","language":"Shell","funding_links":[],"categories":["others","Shell"],"sub_categories":[],"readme":"# Dev Container Templates: Self Authoring Guide\n\n\u003e This repo provides a starting point and example for creating your own custom [Dev Container Templates](https://containers.dev/implementors/templates), hosted for free on GitHub Container Registry.  The example in this repository follows the [Dev Container Template distribution specification](https://containers.dev/implementors/templates-distribution/).  \n\u003e\n\u003e To provide feedback on the distribution spec, please leave a comment [on spec issue #71](https://github.com/devcontainers/spec/issues/71).\n\n## Repo and Template Structure\n\nThis repository contains a _collection_ of two Templates - `hello` and `color`. These Templates serve as simple template implementations which helps containerize the project. Similar to the [`devcontainers/templates`](https://github.com/devcontainers/templates) repo, this repository has a `src` folder.  Each Template has its own sub-folder, containing at least a `devcontainer-template.json` and `.devcontainer/devcontainer.json`. \n\n```\n├── src\n│   ├── color\n│   │   ├── devcontainer-template.json\n│   │   └──| .devcontainer\n│   │      └── devcontainer.json\n│   ├── hello\n│   │   ├── devcontainer-template.json\n│   │   └──| .devcontainer\n│   │      ├── devcontainer.json\n│   │      └── Dockerfile\n|   ├── ...\n│   │   ├── devcontainer-template.json\n│   │   └──| .devcontainer\n│   │      └── devcontainer.json\n├── test\n│   ├── color\n│   │   └── test.sh\n│   ├── hello\n│   │   └── test.sh\n│   └──test-utils\n│      └── test-utils.sh\n...\n```\n\n### Options\n\nAll available options for a Template should be declared in the `devcontainer-template.json`. The syntax for the `options` property can be found in the [devcontainer Template json properties reference](https://containers.dev/implementors/templates#devcontainer-templatejson-properties).\n\nFor example, the `color` Template provides three possible options (`red`, `gold`, `green`), where the default value is set to \"red\".\n\n```jsonc\n{\n    // ...\n    \"options\": {\n        \"favorite\": {\n            \"type\": \"string\",\n            \"description\": \"Choose your favorite color.\",\n            \"proposals\": [\n                \"red\",\n                \"gold\",\n                \"green\"\n            ],\n            \"default\": \"red\"\n        }\n    }\n}\n```\n\nAn [implementing tool](https://containers.dev/supporting#tools) will use the `options` property from [the documented Dev Container Template properties](https://containers.dev/implementors/templates#devcontainer-templatejson-properties) for customizing the Template. See [option resolution example](https://containers.dev/implementors/templates#option-resolution-example) for details.\n\n## Distributing Templates\n\n**Note**: *Allow GitHub Actions to create and approve pull requests* should be enabled in the repository's `Settings \u003e Actions \u003e General \u003e Workflow permissions` for auto generation of `src/\u003ctemplate\u003e/README.md` per Template (which merges any existing `src/\u003ctemplate\u003e/NOTES.md`).\n\n### Versioning\n\nTemplates are individually versioned by the `version` attribute in a Template's `devcontainer-template.json`. Templates are versioned according to the semver specification. More details can be found in [the Dev Container Template specification](https://containers.dev/implementors/templates-distribution/#versioning).\n\n### Publishing\n\n\u003e NOTE: The Distribution spec can be [found here](https://containers.dev/implementors/templates-distribution/).  \n\u003e\n\u003e 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.\n\nTemplates are source files packaged together that encode configuration for a complete development environment.\n\nThis repo contains a GitHub Action [workflow](.github/workflows/release.yaml) that will publish each template to GHCR.  By default, each Template will be prefixed with the `\u003cowner/\u003crepo\u003e` namespace.  For example, the two Templates in this repository can be referenced by an [implementing tool](https://containers.dev/supporting#tools) with:\n\n```\nghcr.io/devcontainers/template-starter/color:latest\nghcr.io/devcontainers/template-starter/hello:latest\n```\n\nThe provided GitHub Action will also publish a third \"metadata\" package with just the namespace, eg: `ghcr.io/devcontainers/template-starter`. This contains information useful for tools aiding in Template discovery.\n\n'`devcontainers/template-starter`' is known as the template collection namespace.\n\n### Marking Template Public\n\nFor your Template to be used, it currently needs to be available publicly. By default, OCI Artifacts in GHCR are marked as `private`. \n\nTo make them public, navigate to the Template's \"package settings\" page in GHCR, and set the visibility to 'public`. \n\n```\nhttps://github.com/users/\u003cowner\u003e/packages/container/\u003crepo\u003e%2F\u003ctemplateName\u003e/settings\n```\n\n### Adding Templates to the Index\n\nNext you will need to add your Templates collection to our [public index](https://containers.dev/templates) so that other community members can find them. Just follow these steps once per collection you create:\n\n* Go to [github.com/devcontainers/devcontainers.github.io](https://github.com/devcontainers/devcontainers.github.io)\n     * This is the GitHub repo backing the [containers.dev](https://containers.dev/) spec site\n* Open a PR to modify the [collection-index.yml](https://github.com/devcontainers/devcontainers.github.io/blob/gh-pages/_data/collection-index.yml) file\n\nThis 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/templates/codespaces) surface Templates for their Dev Container Creation Configuration UI.\n\n### Testing Templates\n\nThis repo contains a GitHub Action [workflow](.github/workflows/test-pr.yaml) for testing the Templates. Similar to the [`devcontainers/templates`](https://github.com/devcontainers/templates) repo, this repository has a `test` folder.  Each Template has its own sub-folder, containing at least a `test.sh`.\n\nFor running the tests locally, you would need to execute the following commands -\n\n```\n    ./.github/actions/smoke-test/build.sh ${TEMPLATE-ID} \n    ./.github/actions/smoke-test/test.sh ${TEMPLATE-ID} \n```\n\n### Updating Documentation\n\nThis repo contains a GitHub Action [workflow](.github/workflows/release.yaml) that will automatically generate documentation (ie. `README.md`) for each Template. This file will be auto-generated from the `devcontainer-template.json` and `NOTES.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcontainers%2Ftemplate-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevcontainers%2Ftemplate-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevcontainers%2Ftemplate-starter/lists"}