Docker Community Forums

Share and learn in the Docker community.

Connect client to daemin

(Norricorp) #1

I am new to Docker and have read a few books on the subject and looked at the online docs.
Docker does seem still to be evolving and the books, though this year, are already out of date in areas. Or not very clear.
Anyway, I am trying to use a Docker client on a Mint 16 VM running 1.9.1 connect to a Docker daemon running on a Centos7 CM, also running 1.9.1 Docker.
I have read the “Protect the Docker daemon socket” docs.
So do I have to do this - I just want to play with Docker and this is on a few local VMs.
I did try this from Mint
docker -H centos7:2376 ps
and got
An error occurred trying to connect: Get http://centos7:2376/v1.21/containers/json: dial tcp no route to host

But I can ping centos7 and get a response.
So does the daemon machine need an application server to be running?
So generally a bit confused by the whole thing at the moment.

(Norricorp) #2

did anyone have any ideas on this?
I am sure it is a really basic question but those tend to be the stoppers for me.
For instance, the way I am trying to use Docker - a daemon on one machine, a client on another machine, both Linux; is that allowed or am I trying to get the tool to do something it can’t.
I changed the docker daemon system unit file to listen on the tcp ip address and standard port and then restarted .
From the client I get the same result as described whether I use the ip address or machine name - I can ping on both.
As I mentioned, if docker can do this then I am sure this is easy to answer. So if someone could take the time that would be great.