Skip to content

Commit 8e8bcce

Browse files
authored
[Oct 27, 2021, Universe] Dev container feature configuration (beta) (#22136)
* Update dev container config info * Update feature availability * Add image of addtl. features menu
1 parent 3ee34fa commit 8e8bcce

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
50.7 KB
Loading

content/codespaces/customizing-your-codespace/configuring-codespaces-for-your-project.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ shortTitle: Configure your project
2222

2323
## About dev containers
2424

25-
A development container, or dev container, is the environment that {% data variables.product.prodname_codespaces %} uses to provide the tools and runtimes that your project needs for development. When working with a dev container in {% data variables.product.prodname_codespaces %} you can either [use the default configuration](#using-the-default-configuration), [use a predefined configuration](#using-a-predefined-container-configuration), or [create your own configuration](#creating-a-custom-codespace-configuration). The option you choose is dependent on the tools, runtimes, dependencies, and workflows that a user might need to be successful with your project.
25+
A development container, or dev container, is the environment that {% data variables.product.prodname_codespaces %} uses to provide the tools and runtimes that your project needs for development. If your project does not already have a dev container defined, {% data variables.product.prodname_codespaces %} will use the default configuration, which contains many of the common tools that your team might need for development with your project. For more information, see "[Using the default configuration](#using-the-default-configuration)."
26+
27+
If you want all users of your project to have a consistent environment that is tailored to your project, you can add a dev container to your repository. You can use a predefined configuration to select a common configuration for various project types with the option to further customize your project or you can create your own custom configuration. For more information, see "[Using a predefined container configuration](#using-a-predefined-container-configuration)" and "[Creating a custom codespace configuration](#creating-a-custom-codespace-configuration)." The option you choose is dependent on the tools, runtimes, dependencies, and workflows that a user might need to be successful with your project.
2628

2729
{% data variables.product.prodname_codespaces %} allows for customization on a per-project and per-branch basis with a `devcontainer.json` file. This configuration file determines the environment of every new codespace anyone creates for your repository by defining a development container that can include frameworks, tools, extensions, and port forwarding. A Dockerfile can also be used alongside the `devcontainer.json` file in the `.devcontainer` folder to define everything required to create a container image.
2830

@@ -79,17 +81,30 @@ The default configuration is a good option if you're working on a small project
7981

8082
Predefined container definitions include a common configuration for a particular project type, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed.
8183

82-
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project's setup.
84+
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project's setup.
8385

8486
{% data reusables.codespaces.command-palette-container %}
8587
1. Click the definition you want to use.
8688
![List of predefined container definitions](/assets/images/help/codespaces/predefined-container-definitions-list.png)
87-
1. Follow the prompts to customize your definition.
89+
1. Follow the prompts to customize your definition. For more information on the options to customize your definition, see "[Adding additional features to your `devcontainer.json` file](#adding-additional-features-to-your-devcontainerjson-file)."
8890
1. Click **OK**.
8991
![OK button](/assets/images/help/codespaces/prebuilt-container-ok-button.png)
9092
1. To apply the changes, in the bottom right corner of the screen, click **Rebuild now**. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-changes-to-your-configuration)."
9193
!["Codespaces: Rebuild Container" in the command palette](/assets/images/help/codespaces/rebuild-prompt.png)
9294

95+
### Adding additional features to your `devcontainer.json` file
96+
97+
{% note %}
98+
99+
**Note:** This feature is in beta and subject to change.
100+
101+
{% endnote %}
102+
103+
You can add features to your predefined container configuration to customize which tools are available and extend the functionality of your workspace without creating a custom codespace configuration. For example, you could use a predefined container configuration and add the {% data variables.product.prodname_cli %} as well. You can make these additional features available for your project by adding the features to your `devcontainer.json` file when you set up your container configuration.
104+
105+
You can add some of the most common features by selecting them when configuring your predefined container. For more information on the available features, see the [script library](https://github.com/microsoft/vscode-dev-containers/tree/main/script-library#scripts) in the `vscode-dev-containers` repository.
106+
107+
![The select additional features menu during container configuration.](/assets/images/help/codespaces/select-additional-features.png)
93108

94109
## Creating a custom codespace configuration
95110

0 commit comments

Comments
 (0)