Skip to content

feat(devcontainers-cli): support pinned and mirrored installs - #1047

Open
Edd88-pixel wants to merge 2 commits into
coder:mainfrom
Edd88-pixel:feat/devcontainers-cli-pinned-mirrored-installs
Open

feat(devcontainers-cli): support pinned and mirrored installs#1047
Edd88-pixel wants to merge 2 commits into
coder:mainfrom
Edd88-pixel:feat/devcontainers-cli-pinned-mirrored-installs

Conversation

@Edd88-pixel

Copy link
Copy Markdown
Contributor

Why

The module always installed the latest @devcontainers/cli release from the package manager's configured public source. That made reproducible installs and restricted-network workspaces difficult, while global installs could depend on elevated permissions.

Changes

  • add validated inputs for an npm version or dist-tag and an optional npm-compatible registry URL
  • install into Coder's agent-managed binary directory without sudo
  • preserve existing package-manager detection and skip installation when devcontainer is already available
  • propagate package-manager failures and verify the installed command is on PATH
  • document pinned, mirrored, and air-gapped usage
  • add Terraform tests, deterministic npm/pnpm/Yarn runtime coverage, and a real pinned npm installation test

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/devcontainers-cli
New version: v1.2.0
Breaking change: [ ] Yes [x] No

Validation

  • terraform test — 4 passed
  • bun test registry/coder/modules/devcontainers-cli/main.test.ts — 9 passed
  • real npm installation of @devcontainers/cli@0.80.0 in node:22-alpine, followed by devcontainer --version
  • terraform validate
  • repository ShellCheck validation
  • repository README validation
  • targeted Prettier and Terraform formatting checks
  • tsc --noEmit

Related Issues

Related to #427 and #308.

@Edd88-pixel
Edd88-pixel marked this pull request as ready for review August 12, 2026 10:30
@Edd88-pixel

Copy link
Copy Markdown
Contributor Author

@matifali could you review this please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants