Author : MD TAREQ HASSAN | Updated : 2023/07/24

Inroduction

Each feature corresponds to a specific set of tools, extensions, or configurations that you want to add to the Devcontainer

Example

Lets say we want to create a devcontainer for nodejs and typescript. And, we also want powershell & azure-cli to be installed in that devcontainer.

devcontainer.json

{
	"name": "Node.js & TypeScript",

	"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
	
	"features": {
		"ghcr.io/devcontainers/features/azure-cli:1": {},
		"ghcr.io/devcontainers/features/powershell:1": {}
	}

}

Update features of existing configuration

“Dev Containers: Configure Container Features” command allows you to update an existing configuration

official and community-supported Dev Container Features

Custom feature

We can create out own feature, See: https://github.com/devcontainers/feature-starter