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

オープン
#730 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
json, vscode

調査の方向性

まず devcontainer.json スキーマと、customizations.vscode.extensions の既存の処理を見つけます。提案されている文字列構文とオプションのオブジェクト構文を比較し、そのうえで、固定されたバージョンに必要な検証およびインストールの動作を判断します。対応済みとは、サポートされ文書化された構文によって、固定されていない宣言を壊すことなく、要求された拡張機能のバージョンを確実にインストールできることです。

索引モデルが issue の本文から書いたものです。

説明

Problem

Currently, when defining extensions in devcontainer.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:

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

Alternative Syntax (optional)

Another possible approach could be:

{
  "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.

主要言語
言語のデータがありません
スター
5.7k
フォーク
497
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/spec のほかの issue

devcontainers/spec の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。