How can I specify the docker daemon url when using vscode-remote-docker. It seems that I can only connect to a local docker daemon.
1 Answer
There is documentation on how to do this on the advanced usage page. The main point about connecting to a remote daemon is to create a tunnel to the system. You can see examples of how to do that here:
https://code.visualstudio.com/docs/remote/containers-advanced
I use an ssh tunnel that I setup to point to my remote docker daemon. Here's the command:
ssh -fNL localhost:23750:/var/run/docker.sock remote-user@remote-server
You then need to set your DOCKER_HOST variable in vscode preferences to localhost:23750.