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

Permit use of Remote Container using SSH transport #636

Closed
zoredache opened this issue Jun 10, 2019 · 6 comments
Closed

Permit use of Remote Container using SSH transport #636

zoredache opened this issue Jun 10, 2019 · 6 comments
Assignees
Labels
containers Issue in vscode-remote containers plan-item A plan item
Milestone

Comments

@zoredache
Copy link

zoredache commented Jun 10, 2019

Recent versions of docker (1809+) can work with remotes by setting a value for DOCKER_HOST that looks like this.

PS > $env:DOCKER_HOST='ssh://[email protected]'

PS > docker system info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
...
PS > docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.
...

If you run VSCode with verbose mode I get an error about my DOCKER_HOST.

PS > code --verbose
...
[24784:0610/141325.224:INFO:CONSOLE(3187)] "Activating extension 'ms-vscode-remote.remote-containers' failed: DOCKER_HOST env variable should be something like tcp://localhost:1234.", source: file:///C:/Users/zoredache/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (3187)

Using SSH as a transport for remote docker usage tends to be far easier to configure compared with tls/tcp transports. Please add this functionality to the extension.

@Chuxel
Copy link
Member

Chuxel commented Jun 14, 2019

@chrmarti @zoredache This is coming from one our dependencies docker-modem here: https://github.com/apocas/docker-modem/blob/0d07517d3f684d7d151ec06e090041a936b4ff67/lib/modem.js#L35

This is a dependency of dockerode, so to fix both would need to rev so we can pick up the updated dependency.

@Chuxel Chuxel added containers Issue in vscode-remote containers feature-request Request for new features or functionality upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote) labels Jun 14, 2019
@chrmarti
Copy link
Contributor

Tracked in docker-modem: apocas/docker-modem#99

There is already a PR.

@igorbb
Copy link

igorbb commented Oct 24, 2019

Would this merged PR for it be enoguh ?
apocas/docker-modem#102

@chrmarti
Copy link
Contributor

@igorbb Yes, we need a new version of dockerode to pick up the latest from docker-modem from what I see.

@egamma egamma removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote) label Nov 1, 2019
@egamma egamma added this to the November 2019 milestone Nov 1, 2019
@chrmarti chrmarti added plan-item A plan item and removed feature-request Request for new features or functionality labels Nov 6, 2019
@chrmarti chrmarti self-assigned this Nov 7, 2019
@chrmarti
Copy link
Contributor

chrmarti commented Nov 7, 2019

This works with the latest version of docker-modem when used with the ssh-agent for authentication. Ideally it would also support reading from the user's ssh config. I have filed apocas/docker-modem#113 for this.

@chrmarti chrmarti closed this as completed Nov 7, 2019
@chrmarti
Copy link
Contributor

chrmarti commented Nov 7, 2019

Still need to check using DOCKER_HOST and authentication on Windows (https://github.com/microsoft/vscode-docker/blob/836a76500c1e3edaadccdea944dec31b3e586c2c/src/utils/refreshDockerode.ts#L77).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers plan-item A plan item
Projects
None yet
Development

No branches or pull requests

5 participants