1

Scenario: I have 2 docker daemons listening on separate unix socket and TCP socket.

Question: If I run a command, say docker service ls then how can I know which docker host my CLI returned the information from?

1 Answer 1

2

From the docker CLI, you need to use the -H option in order to specify the socket you want docker to talk to.

Or you can set the environment variable DOCKER_HOST (Daemon socket to connect to).
If docker service ls is working, that means that variable was set. Its value would indicate to which docker daemon it is talking to.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.