devcontainers / devcontainers/spec

🚀 Feature Request: Support extension version pinning in devcontainer.json

Open
#730 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

### Problem

Currently, when defining extensions in `devcontainer.json`:

```json
{
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp"
]
}
}
}
```

The latest version of the extension is always installed.

This creates issues in team environments because:

* Extension updates can introduce breaking changes
* Developers may end up with inconsistent environments
* Builds and development workflows become less predictable

---

### Proposed Solution

Allow specifying a version when declaring extensions, for example:

```json
{
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp@1.25.0"
]
}
}
}
```

---

### Alternative Syntax (optional)

Another possible approach could be:

```json
{
"customizations": {
"vscode": {
"extensions": [
{
"id": "ms-dotnettools.csharp",
"version": "1.25.0"
}
]
}
}
}
```

---

### Benefits

* Reproducible development environments
* Better stability for teams and CI/CD workflows
* Alignment with other ecosystems (e.g., npm, pip, Docker image tags)
* Eliminates need for manual `.vsix` workarounds

---

### Current Workarounds

* Manually downloading `.vsix` files and installing them via scripts
* Using `postCreateCommand` to install specific versions (not always reliable)
* Maintaining custom Docker images with pre-installed extensions

These approaches add complexity and reduce maintainability.

---

### Additional Context

This feature would significantly improve Dev Container usability in professional environments, especially for teams working with strict version control and reproducibility requirements.

---

### Thank you 🙏

Thanks for the amazing work on Dev Containers! This feature would make it even more powerful for team-based development.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.