Skip to content
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-SSH Bug]: "Attach Visual Studio Code" fails for MacOS docker containers #10037

Closed
3 tasks done
junwha opened this issue Jul 7, 2024 · 6 comments
Closed
3 tasks done
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@junwha
Copy link

junwha commented Jul 7, 2024

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

Hi, I'm trying to attach my VSCode to a docker container, and experiencing an issue.
It shows an error "Command failed". I guess it's from the incorrect replacement of username "qbit -n" since it should be "qbit".

image

Error running command remote-containers.attachToRunningContainerFromViewlet: Command failed: mkdir -p /Users/qbit -n/.vscode-remote-containers/bin/8b3775030ed1a69b13e4f4c628c612102e30a681_1720348909009. This is likely caused by the extension that contributes remote-containers.attachToRunningContainerFromViewlet.

Expected Behavior

Opening a window on a docker container

Steps To Reproduce

Host:: Windows 10 pro
Server:: macOS 14.5
Container Image:: arm64v8/ubuntu

Remote-SSH Log

Remote-SSH Log

[19:50:26.355] Opening exec server for ssh-remote+7b22686f73744e616d65223a2253324c41422d4d6163227d
[19:50:26.428] Verified and reusing cached exec server for ssh-remote+7b22686f73744e616d65223a2253324c41422d4d6163227d

Anything else?

No response

@junwha junwha added the ssh Issue in vscode-remote SSH label Jul 7, 2024
@junwha junwha changed the title [Remote-SSH Bug]: [Remote-SSH Bug]: "Attach Visual Studio Code" fails for MacOS docker containers Jul 7, 2024
@bamurtaugh
Copy link
Member

cc @chrmarti as well

@junwha
Copy link
Author

junwha commented Jul 24, 2024

@bamurtaugh FYI: An alternative way is to forward port 22 to host port xxxx and activate the SSH service inside a docker, and attach the VSCode to that port.

@chrmarti chrmarti assigned chrmarti and unassigned roblourens Jul 25, 2024
@chrmarti chrmarti added containers Issue in vscode-remote containers bug Issue identified by VS Code Team member as probable bug and removed ssh Issue in vscode-remote SSH labels Jul 25, 2024
@chrmarti chrmarti added this to the July 2024 milestone Jul 25, 2024
@junwha
Copy link
Author

junwha commented Jul 25, 2024

@chrmarti which version was it resolved? I still have same problem.

@chrmarti
Copy link
Contributor

To verify on macOS:

  • Enable Remote Login in the system settings.
  • Connect to the local SSH server with Remote-SSH: Connect to Host... using localhost.
  • Start a container to attach to: docker run -d alpine sleep inf
  • Use Dev Containers: Attach to Running Container... to attach to the container.
  • Verify this works.

@chrmarti
Copy link
Contributor

@junwha0511 This will be in the next pre-release version. I will do that later today.

@chrmarti
Copy link
Contributor

This is now available in Dev Containers 0.379.0-pre-release.

@joshspicer joshspicer added the verified Verification succeeded label Jul 25, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants