-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote container error - Terminal failed to launch #2350
Comments
@KennyChen0909 Try installing the Docker extension in workspace mode instead of UI mode (in your scenario, it will read "Install in SSH..." instead of "Install in WSL...": @karolz-ms For one thing we should be warning when this is attempted--I thought we already were but maybe that code is misbehaving. However, I'm starting to doubt the value of supporting UI mode at all. It seems like 95%+ of the time users want it to be in workspace mode, but even though workspace mode is preferred (and, package.json explicitly defines it as preferred), it is not the default until the extension is installed in the remote workspace. What do you think? |
@bwateratmsft agreed. I am re-reading the extensionKind docs and I am having hard time coming up with a situation where Docker extension would want to run as an UI extension. |
The only scenario I can think of is running a container locally and attaching to it. You'd want the Docker extension to stay pointing at the host (i.e., in UI mode, here), but VSCode within the container. |
Good point. Still, making the extension workspace-only is probably a good tradeoff. If one needs to work with Docker inside the container, they can install Docker CLI into it and map the Docker socket to the host; this is already documented |
Oh, bonus bug. Even in workspace mode this does not work. I opened #2356 to track removing UI mode; I'll keep this as the bug to fix for this not working at all in workspace mode. |
@alexr00 The task execution is executing in the right place (on the remote Linux server) but trying to use the wrong shell (powershell). This only happens if no workspace or workspace folder is open. Our code for this is here. Any ideas what's going wrong? Is there an option we're forgetting to pass? |
@bwateratmsft Do we have a workaround for my customer for this issue? |
@bwateratmsft I will need to debug and see. There's nothing obvious I can think of. |
Previous behavior was to fallback to local. It makes more sense to fallback to the the first remote details instead Related to microsoft/vscode-docker#2350
Looks like we were falling back to the local details when there wasn't a folder open. It makes more sense to fallback to the first remote's details instead. Change has been pushed to VS Code. Please test it in insiders once it is available! |
Thank you for the fast fix as always @alexr00! I'll try it out in Insiders ASAP. @KennyChen0909 As a workaround, if you open any folder in the remote window (even an empty one) with File -> Open Folder, it should cause the commands to start working. |
Previous behavior was to fallback to local. It makes more sense to fallback to the the first remote details instead Related to microsoft/vscode-docker#2350
@alexr00 everything seems to be working perfectly now, thank you! @KennyChen0909 I'm going to close this as fixed since there's no additional work to be done in the Docker extension; I assume the fix should be available in VSCode 1.50.0; it is in Insiders now. |
This is now fixed in VSCode 1.50. |
I have a customer trying to launch remote containers through VSCode to a linux docker system and receive a Terminal failed to launch error despite being able to connect to the docker server and view containers.
From the screenshot, it seems that VSCode is trying to use a local powershell terminal when it should use a remote bash terminal.
From this document: https://code.visualstudio.com/docs/remote/ssh#_opening-a-terminal-on-a-remote-host
Opening a terminal on the remote host from VS Code is simple. Once connected, any terminal window you open in VS Code (Terminal > New Terminal) will automatically run on the remote host rather than locally.
Can we know is there any settings needs to be noticed to make it open bash on remote?
The text was updated successfully, but these errors were encountered: