refactor: unify devcontainer templates under noble base image and upd…#24
Conversation
…ate features Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
This PR standardizes all built-in devcontainer templates onto the Ubuntu noble base image with Docker-in-Docker, and replaces the prior Node.js/TypeScript and Bun templates with a single unified typescript template built via devcontainer features.
Changes:
- Introduces a
createTemplateDefinitionhelper to generate consistent template definitions (base image + standardized features). - Replaces
node-typescriptandbunwith a unifiedtypescripttemplate that composes Node.js + Bun features. - Updates tests and README to reflect the new templates, base image, and expected generated configs/output.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/templates.ts |
Refactors template definitions to use a single noble base image + Docker-in-Docker and adds a helper for consistency; introduces unified typescript template. |
tests/templates.test.ts |
Updates template tests for noble base + feature-based typescript template and verifies all templates include Docker-in-Docker. |
tests/examples.test.ts |
Updates example-workspace expectations for template listing and generated config shape (image + features). |
tests/examples.live.test.ts |
Makes arise output assertion resilient to variable counts via regex. |
tests/core.test.ts |
Updates resolveWorkspaceConfig expectations to match feature-based template configs. |
README.md |
Updates the list of built-in templates to include typescript and remove the old templates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const BASE_IMAGE = "mcr.microsoft.com/devcontainers/base:noble"; | ||
| const BASE_NAME = "noble"; | ||
| const DOCKER_IN_DOCKER_FEATURE = "ghcr.io/devcontainers/features/docker-in-docker:2"; | ||
| const DOTNET_FEATURE = "ghcr.io/devcontainers/features/dotnet:2"; | ||
| const GO_FEATURE = "ghcr.io/devcontainers/features/go:1"; | ||
| const JAVA_FEATURE = "ghcr.io/devcontainers/features/java:1"; | ||
| const NODE_FEATURE = "ghcr.io/devcontainers/features/node:1"; | ||
| const RUST_FEATURE = "ghcr.io/devcontainers/features/rust:1"; | ||
| const BUN_FEATURE = "ghcr.io/devcontainers-extra/features/bun:1"; | ||
| const UV_FEATURE = "ghcr.io/devcontainers-extra/features/uv:1"; |
There was a problem hiding this comment.
BASE_IMAGE is set to mcr.microsoft.com/devcontainers/base:noble and pinnedReference is built from that tag plus major-version feature refs. Since tags/major refs are mutable, this makes the "pinnedReference" value non-reproducible and potentially misleading (it’s not actually pinned). Consider using a versioned image tag or digest for the base image (and more specific feature refs where possible), or rename/split the field so consumers don’t interpret it as a stable/pinned reference.
| const BASE_IMAGE = "mcr.microsoft.com/devcontainers/base:noble"; | |
| const BASE_NAME = "noble"; | |
| const DOCKER_IN_DOCKER_FEATURE = "ghcr.io/devcontainers/features/docker-in-docker:2"; | |
| const DOTNET_FEATURE = "ghcr.io/devcontainers/features/dotnet:2"; | |
| const GO_FEATURE = "ghcr.io/devcontainers/features/go:1"; | |
| const JAVA_FEATURE = "ghcr.io/devcontainers/features/java:1"; | |
| const NODE_FEATURE = "ghcr.io/devcontainers/features/node:1"; | |
| const RUST_FEATURE = "ghcr.io/devcontainers/features/rust:1"; | |
| const BUN_FEATURE = "ghcr.io/devcontainers-extra/features/bun:1"; | |
| const UV_FEATURE = "ghcr.io/devcontainers-extra/features/uv:1"; | |
| const BASE_IMAGE = | |
| "mcr.microsoft.com/devcontainers/base:noble@sha256:<REPLACE_WITH_PUBLISHED_BASE_IMAGE_DIGEST>"; | |
| const BASE_NAME = "noble"; | |
| const DOCKER_IN_DOCKER_FEATURE = | |
| "ghcr.io/devcontainers/features/docker-in-docker@sha256:<REPLACE_WITH_PUBLISHED_DOCKER_IN_DOCKER_DIGEST>"; | |
| const DOTNET_FEATURE = | |
| "ghcr.io/devcontainers/features/dotnet@sha256:<REPLACE_WITH_PUBLISHED_DOTNET_DIGEST>"; | |
| const GO_FEATURE = | |
| "ghcr.io/devcontainers/features/go@sha256:<REPLACE_WITH_PUBLISHED_GO_DIGEST>"; | |
| const JAVA_FEATURE = | |
| "ghcr.io/devcontainers/features/java@sha256:<REPLACE_WITH_PUBLISHED_JAVA_DIGEST>"; | |
| const NODE_FEATURE = | |
| "ghcr.io/devcontainers/features/node@sha256:<REPLACE_WITH_PUBLISHED_NODE_DIGEST>"; | |
| const RUST_FEATURE = | |
| "ghcr.io/devcontainers/features/rust@sha256:<REPLACE_WITH_PUBLISHED_RUST_DIGEST>"; | |
| const BUN_FEATURE = | |
| "ghcr.io/devcontainers-extra/features/bun@sha256:<REPLACE_WITH_PUBLISHED_BUN_DIGEST>"; | |
| const UV_FEATURE = | |
| "ghcr.io/devcontainers-extra/features/uv@sha256:<REPLACE_WITH_PUBLISHED_UV_DIGEST>"; |
This pull request standardizes all built-in devcontainer templates to use the Ubuntu noble base image with Docker-in-Docker, and replaces the previous Node.js/TypeScript and Bun templates with a unified
typescripttemplate that uses devcontainer features for Node.js and Bun. The changes also update tests and documentation to reflect these new templates and configurations.Template standardization and unification:
mcr.microsoft.com/devcontainers/base:nobleimage as their base, with the Docker-in-Docker feature preinstalled. This replaces previous images based on Ubuntu 24.04, Debian bookworm, and Debian trixie.node-typescriptandbuntemplates are removed and replaced with a singletypescripttemplate that includes both Node.js and Bun via devcontainer features. [1] [2]typescripttemplate is now exposed in template summaries and is verified in tests.Template implementation improvements:
createTemplateDefinitionhelper function is introduced to generate template definitions consistently, including the correct base image and features.Test and documentation updates:
README.mdis updated to reflect the new set of built-in templates.…ate features