microsoft / microsoft/vscode-remote-release
Using WSL's SSH and Docker to connect to remote Docker host
@chrmarti is already working on this.
Since Jan 2, 2020.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Issue Type: Bug
SSH docker.host, e.g. `"docker.host": "ssh://username@mylanserver"
F1, Remote-Containers: Attach to running container
Fails with permission error
This is related to the new functionality in 1.41
https://github.com/microsoft/vscode-docs/blob/master/remote-release-notes/v1_41.md#support-for-ssh-as-docker-host
May be related to https://github.com/microsoft/vscode-remote-release/issues/937
Setup
- local Windows 10 1909 build 18363.535
- remote Ubuntu 18.04.3 LTS
- VS Code for Windows 1.41.1 (system setup)
- Have working SSH ~/.ssh/config and key setup for seamless ssh usage in WSL.
- Have working shim bat file that if VSCode needs to run
sshfrom windows, that it is routed to WSL. This includes the setting"remote.SSH.path": "C:\\mybatfile.bat" - Have working remote explorer that successfully shows containers on this remote SSH target
- Have working Remote-SSH solution to this remote docker host
- In main settings for VSCode, set
"docker.host": "ssh://username@mylanserver"
Repro
- Open VSCode
- Click green remote icon in lower left
- Choose Remote-Containers: Attach to running container
Result
Current user does not have permission to run 'docker'. Try adding the user to the 'docker' group.
(Documenation / Cancel)
Also notice minor typo in the button. The t is missing.
Expected
Some UI that lists the containers running on that remote SSH server and ability to chose the specific container to which I want to connect
Notes
- From WSL I can run
ssh username@mylanserverand it seamlessly connects and I get a prompt - On that prompt I can run
docker container lsand see all the containers - On that prompt I can run
docker run hello-worldand I get the successful expected output
Extension version: 0.94.0
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.4.0-18362-Microsoft
Remote OS version: Linux x64 4.4.0-18362-Microsoft
Remote OS version: Linux x64 5.0.0-37-generic
Remote OS version: Linux x64 4.4.0-18362-Microsoft
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2594) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.89GB (6.62GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Ubuntu-18.04 |
| OS | Linux x64 4.4.0-18362-Microsoft |
| CPUs | Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2601) |
| Memory (System) | 15.89GB (6.62GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Ubuntu-18.04 |
| OS | Linux x64 4.4.0-18362-Microsoft |
| CPUs | Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2601) |
| Memory (System) | 15.89GB (6.62GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: home-nas |
| OS | Linux x64 5.0.0-37-generic |
| CPUs | Intel(R) Pentium(R) CPU G3258 @ 3.20GHz (2 x 1974) |
| Memory (System) | 7.66GB (2.72GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Ubuntu-18.04 |
| OS | Linux x64 4.4.0-18362-Microsoft |
| CPUs | Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2601) |
| Memory (System) | 15.89GB (6.62GB free) |
| VM | 0% |
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.