Open yaoshuyin opened 5 years ago
I would like to know the same, while using like this in the terminal works, the plugin seems to be expecting /var/run/docker.sock
to be present which in the case of a remote connection, it would not be present on the local machine (vscode).
It would be good if the plugin detects ENV's set and adjust accordingly.
export DOCKER_HOST=tcp://172.27.1.141:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=~/.docker
It seems there is away to change its behaviour.
The change is quite simple, it doesn't seem to read/understand usual ENVs but vscode has a settings file you can set this.
Heres my 'live' example, hopefully you find it helpful to you.
soakes@vscode01:~$ cat user-data/User/settings.json
{
"docker.host":"tcp://172.27.1.121:2376",
"docker.certPath": "/data/coder/soakes/.docker",
"docker.tlsVerify": "1"
}
More info can be found here: https://code.visualstudio.com/docs/remote/containers-advanced
In the end i've also changed this plugin as it seems this hasn't been updated in a long time to: https://github.com/microsoft/vscode-docker/releases
Which does this and more.
Now I can confirm remote TLS docker host though vscode works loverly.
Thank you for your perfect plugin, sir. I need to connect to a remote docker daemon, such as docker -H 192.168.0.100:2375, how can I use it, or can you add this feature? Thank you. Have a good day!