microsoft / microsoft/vscode-remote-release
Dev Containers: add command to reinstall/sync extensions from devcontainer.json in the current container
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
When using Dev Containers, VS Code installs extensions declared in devcontainer.json under customizations.vscode.extensions.
In practice, these installs can occasionally fail during container creation or rebuild, for example because of transient network/download issues. When that happens, the container can be left in a partially configured state, and I have not found a way to explicitly retry installing the extensions declared in devcontainer.json for the current container.
At the moment, the only workaround I know is to rebuild/reopen the container again and hope the extension installation succeeds on the next attempt.
Requested feature
Please add a command to re-run extension installation for the current container based on the contents of devcontainer.json, for example:
Dev Containers: Reinstall Extensions from devcontainer.jsonDev Containers: Sync Container Extensions with devcontainer.json
Expected behavior
The command should:
- read
customizations.vscode.extensionsfrom the activedevcontainer.json - detect which declared extensions are missing in the current container
- retry installation of missing and/or previously failed extensions
- provide visible progress and error reporting
Why this would help
This would provide a lightweight recovery path for cases where extension installation fails transiently, without requiring a full rebuild of the container.
It would also help when extension installation failures are easy to miss and only become apparent later, after the container is already up and in use.
Nice-to-haves
Possible enhancements:
- show which declared extensions are already installed vs missing
- offer “retry failed installs only”
- surface failed installs more prominently instead of failing silently
- optionally prompt to re-sync when VS Code detects declared extensions are missing from the connected container
Current workaround
Rebuild/reopen the dev container again to trigger extension installation another time.
Additional context
This request is specifically about reapplying the extensions declared in devcontainer.json to an already created/currently connected container, without needing a full rebuild.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.