Auto-install azd extensions in dev containers
Welcome to the first azd mini blog! Things move fast – new features ship, and it’s easy to miss something useful. These short posts (1-minute reads, we promise) highlight features the team ships that you want to know about. No fluff, just what it is, why it matters, and how to use it.
What’s new?
The azd development (dev) container feature now supports an extensions option. You can specify a comma-separated list of azd extensions in your dev container configuration, and they install automatically when the container builds.
Here’s what it looks like in your devcontainer.json file:
{
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {
"extensions": "azd-ext-example,azd-ext-another"
}
}
}
No more “oh wait, I need to install that extension first” after spinning up your dev container.
Why it matters
Dev containers give you a ready-to-code environment in seconds. But if your project relies on azd extensions, you still had to install them manually after the container started. That’s friction – especially when onboarding new team members or switching between projects.
Now your extensions are ready when the container starts. Open the dev container and run azd up – everything you need is already in place.
How to use it
- Open your
.devcontainer/devcontainer.jsonfile. - Add (or update) the
azdfeature with theextensionsoption:
{
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {
"extensions": "your-extension-name"
}
}
}
- Rebuild your dev container.
That’s it. The extensions install during container build.
Get started
Update your dev container configuration and rebuild. To learn more about creating dev containers, see the VS Code dev container docs.
Feedback
Have questions or ideas? File an issue or start a discussion on GitHub. Want to help shape the future of azd? Sign up for user research.
This feature was introduced in PR #6460.
0 comments
Be the first to start the discussion.