Dev Containers: add command to reinstall/sync extensions from devcontainer.json in the current container
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.
Yes. I need this as well. very frustrating to rebuild the containers each time. Especcialy if I am running multiple devcontainers in my microservice arch i get to reload the vs window for the others if one dev containers fails to install the extensions due to network issue. This can trigger a waterfall efect where one faild extension in dev container make other reload and fail the installation of extensions in the others if network faills. I am running in a corporate environment so things like network fails happen frequently
is any plan to work on this ? can i assist somehow?
Does removing ~/.vscode-server/data/Machine/.installExtensionsMarker and reloading (not rebuilding) help?