Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code error when Attach to Visual Studio Code windows container on local machine

When I right click on a local Windows Docker container in Visual Studio Code > Attach Visual Studio Code, I get the following error. Can Visual Studio Code attach to a Windows container? If so, where can I supply the missing uname/passwd?

[2484 ms] Start: Run in container: uname -m
[3364 ms] Start: Run in container: cat /etc/passwd
[3364 ms] Stdin closed!
[3371 ms] Shell server terminated (code: 126, signal: null)
container b125f4fce0c1de6ff89b6c94a27a7753a1c0c618d227c21f274e176edaedbdc6 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF6FD489F4B: (caller: 00007FF6FD43E13A) Exception(12) tid(628) 8007052E The user name or password is incorrect.
    CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess] 
 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"/bin/sh","User":"root","WorkingDirectory":"/","Environment":{"VSCODE_REMOTE_CONTAINERS_SESSION":"6ddd4179-d78f-4bdf-8723-35e92b8e49651614290826962"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
like image 657
user1594257 Avatar asked Jul 04 '26 21:07

user1594257


1 Answers

Based on official documentation from here: https://code.visualstudio.com/docs/remote/containers#_remote-containers-limitations :

"Windows container images are not yet supported." So I believe this applies for attaching as well.

like image 182
Slavko Ivanović Avatar answered Jul 06 '26 11:07

Slavko Ivanović



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!