Ask questionsConnect to remote docker daemon when using "Remote - SSH" extension
Remote - SSH extension
This 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.
When 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.
The extension is installed locally and lists my local containers/images.
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.
Answer questions aruiz14
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:
~/.ssh/config, you can add to the section of the host you are connecting to the line (the actual port used is irrelevant, you can use a different one as long as it's not in use):
LocalForward 22375 /var/run/docker.sock
Settings, select the tab for the remote host and change the
Docker Hostconfig to
You may need to reconnect to the host or restart VSCode for this to take effect.