Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

各機能は、インストール コードと開発コンテナー構成の自己完結型ユニットであり、さまざまな基本コンテナー イメージで動作するように設計されています。 各機能を使用すると、codespace イメージにツール、ランタイム、またはライブラリをすばやく追加できます。 詳しくは、開発コンテナーの Web サイトで、使用できる機能と機能の仕様に関するページをご覧ください。 機能は、VS Code からか、 のリポジトリから devcontainer.json ファイルに追加できます。 この記事のタブを使用して、これらの機能を追加する各方法の手順を表示します。

With features, you can quickly add tools, runtimes, or libraries to your dev container configuration.

Features are self-contained units of installation code and dev container configuration, designed to work across a wide range of base container images. You can use features to quickly add tools, runtimes, or libraries to your codespace image. For more information, see the available features and features specification on the Development Containers website.

You can add features to a devcontainer.json file from VS Code or from your repository on Use the tabs in this article to display instructions for each of these ways of adding features.

Adding features to a devcontainer.json file

  1. Navigate to your repository on, find your devcontainer.json file, and click to edit the file.

    If you don't already have a devcontainer.json file, you can create one now. For more information, see "Introduction to dev containers."

  2. To the right of the file editor, in the Marketplace tab, browse or search for the feature you want to add, then click the name of the feature.

    Screenshot of the "Marketplace" tab with "Terra" in the search box and the Terraform feature listed in the search results.

  3. Under "Installation," click the code snippet to copy it to your clipboard, then paste the snippet into the features object in your devcontainer.json file.

    Screenshot of the "Marketplace" tab showing the installation code snippet for Terraform.

    "features": {
         "": {},
  4. By default, the latest version of the feature will be used. To choose a different version, or configure other options for the feature, expand the properties listed under "Options" to view the available values, then add the options by manually editing the object in your devcontainer.json file.

    Screenshot of the "Options" section of the "Marketplace" tab, with the "version" and "tflint" properties expanded.

    "features": {
         "": {
             "version": "1.1",
             "tflint": "latest"
  5. Commit the changes to your devcontainer.json file.

The configuration changes will take effect in new codespaces created from the repository. To make the changes take effect in existing codespaces, you will need to pull the updates to the devcontainer.json file into your codespace, then rebuild the container for the codespace. For more information, see "Introduction to dev containers."

To add features in VS Code while you are working locally, and not connected to a codespace, you must have the "Dev Containers" extension installed and enabled. For more information about this extension, see the VS Code Marketplace.

  1. Access the VS Code Command Palette with Shift+Command+P (Mac) or Ctrl+Shift+P (Windows/Linux).

  2. Start typing "add dev" then click Codespaces: Add Dev Container Configuration Files.

    Screenshot of the Command Palette, with "add dev" entered and "Codespaces: Add Dev Container Configuration Files" listed.

  3. Click Modify your active configuration.

  4. Update your feature selections, then click OK.

  5. If you're working in a codespace, a prompt will appear in the lower-right corner. To rebuild the container and apply the changes to the codespace you're working in, click Rebuild Now.

    Screenshot of the message: "We've noticed a change to the dev container configuration." Below this is the "Rebuild Now" button.