microsoft / microsoft/vscode-remote-release
"shutdownAction": "stopContainer" does not respect setting "Execute in WSL"
@chrmarti is already working on this.
Since Sep 22, 2025.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I only have the docker engine installed in my WSL distribution and not on my host machine, so all docker commands must be issued in WSL. Which is why I have "Dev Containers: Execute in WSL" selected in settings. When I set "shutdownAction": "stopContainer" in my devcontainer.json, it is attempting to run the docker commands on the host machine instead of in WSL.
- VSCode Version: 1.104.0
- Local OS Version: 10.0.26100
- Remote OS Version: Ubuntu 22.04.5 LTS
- Logs:
[2025-09-22T17:28:06.980Z] Unexpected error: Error: Exectuable 'docker' not found on PATH '{omitted}'.
at So (c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:36:1381)
at async c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:37:619
at async Gt (c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:30:2108)
at async PS (c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:37:5682)
at async DS (c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:37:7368)
at async c:\Users\{myUser}\.vscode\extensions\ms-vscode-remote.remote-containers-0.427.0\dist\shutdown\shutdownMonitorProcess.js:37:6553
Steps to Reproduce:
- Install the Docker engine in WSL only (not on the host machine)
- Install VS Code
- Configure VS Code to execute commands in WSL
- Configure workspace with
"shutdownAction": "stopContainer"in devcontainer.json - Reopen workspace in Dev Container
- Exit VS Code
Observe that the container is still running
Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A
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.