0

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 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.