Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Rename Dev Container to match folder nameNew to Visual Studio Code? Get it now.
Rename Dev Container to match folder name

Rename Dev Container to match folder name

Stuart Leeks

|
2 installs
| (0) | Free
Convert the "image" property in a devcontainer.json to a Dockerfile.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

devcontainer-rename

A VS Code extension that suggests renaming the "name" property in devcontainer.json to match the workspace name.

After using the "Dev Containers: Add Development Container Configuration Files..." command to create a devcontainer.json file, the dev container's name property is set to the name of the template used to create the definition. I generally prefer the name of the dev container to match the workspace name, so this extension suggests a code action to rename the "name" property in devcontainer.json to match the workspace name.

demo of devcontainer-rename extension

Changelog

  • 0.0.2: Strip any "[...]" suffixes from the workspace name when renaming the devcontainer name (e.g. my-folder [WSL: Ubuntu] becomes my-folder)
  • 0.0.2: Include demo GIF in the README
  • 0.0.1: Initial release

Misc

Thanks to Brigit Murtaugh for the devcontainer-image-convert extension which was a great quickstart for building this extension :-)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft