-
Notifications
You must be signed in to change notification settings - Fork 527
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
Connect to remote docker daemon when using "Remote - SSH" extension #924
Comments
This feature would be amazing, and the most strange behavior is that this extension is one of the few no-theme related extensions that installing on ssh is disabled, it only allows to install locally. EDIT: https://code.visualstudio.com/docs/remote/containers#_advanced-forcing-an-extension-to-run-locally-remotely works, but the button "Attach Visual Studio Code" doesn't work |
My expectations were also that it would use the docker socket in the remote, but it didn't work like that. I managed to make it work with this workaround:
You may need to reconnect to the host or restart VSCode for this to take effect. |
Done some further reading on this. Firstly, this is addressed in the README which I hadn't noticed when I opened the issue. However, all it says about SSH is:
I've also found the document about remote development for extension authors. It looks like adding: "extensionKind": "workspace", in the |
@PabloSzx's workaround fixes the problem for me on "Remote - SSH" sessions, but unfortunately it also breaks "Remote - WSL". (probably a separate issue). A slight improvement on this would be to force the docker extension to be installed on SSH sessions only: "remote.SSH.defaultExtensions": [
"peterjausovec.vscode-docker"
] But I can't get this to work either 😞 Unfortunately, this does mean my previous suggestion of setting |
@pd93 it wouldn't matter if it does not work in remote wsl or docker cause you can't run docker on wsl or in a container. It only needs to function for remote ssh and then forward the data to the client vscode |
@pd93 and others thanks for your comments on this! We've discussed this in the past and it's not a simple thing to pick the default behavior for the docker extension in VS Code remote scenarios. I'm going to close this issue in favor of #954 because this felt specific to SSH and I wanted a new issue that summarized our past discussions, your comments, the current workaround, etc. for all three scenarios (SSH, WSL, and Dev Containers). Feel free to add your opinion to the new issue! |
The
Remote - SSH
extensionThis week, the Remote Development pack was released to Insiders. This allows you to open up a VSCode window as if it were running on the remote host. I have been using the Remote - SSH extension to connect to a server and it works beautifully.
Expected
vscode-docker
behaviourWhen I install the
vscode-docker
extension, it should be installed to the remote VSCode installation.When opening a remote (SSH) vscode session,
vscode-docker
should list images/containers from the docker daemon on the remote host.Actual
vscode-docker
behaviourThe extension is installed locally and lists my local containers/images.
Summary
It would be fantastic if these two extensions could work together so that I can view my remote docker container/images while I'm developing remotely over SSH and my local ones when working locally.
I don't think this effects the Remote - WSL and Remote - Containers extensions as developers tend to use the local Docker daemon in these environment anyway (either via opening TCP port 2375 or by using some form of DinD).
Potentially related to #216 & #646.
The text was updated successfully, but these errors were encountered: