microsoft / microsoft/vscode-remote-release

Using WSL's SSH and Docker to connect to remote Docker host

Open
#2,079 21 comments 2 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Jan 2, 2020.

containers feature-request
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 ssh from 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

  1. Open VSCode
  2. Click green remote icon in lower left
  3. 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

  1. From WSL I can run ssh username@mylanserver and it seamlessly connects and I get a prompt
  2. On that prompt I can run docker container ls and see all the containers
  3. On that prompt I can run docker run hello-world and 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.