gocd-contrib / docker-elastic-agents-plugin

Docker-based elastic agents for GoCD
https://www.gocd.org
Apache License 2.0
31 stars 40 forks source link

a tcp socket connection to docker is done by http://docker-engine:2375 not tcp://docker-engine.2375 #39

Open EugenMayer opened 7 years ago

EugenMayer commented 7 years ago

If you for example do docker-in-docker ( docker:did ) or a usual remote docker-eninge, you would connect using a tcp socket rather then a lock unix socket.

This socket is usually either given by a simple domain:port combination ( since tcp:// is the default if the socket scheme is not given ). This is also part of the docker-client configurations of DOCKER_HOST https://github.com/docker-library/docker/blob/6e7677bec19c214ef5445c0d2b96c56e42098ca1/docker-entrypoint.sh#L17

in elastic-agents though, one has to put http:// instead, which is undocumented and also not what is expected and not used by usual docker clients.

Can we fix this, on which layer this is mapped? using tcp:// does not work at all

arunvelsriram commented 5 years ago

I too came across this issue when trying to use a remote docker daemon. @EugenMayer this issue helped.

It's worth mentioning it in the docs.

GaneshSPatil commented 5 years ago

This issue is caused due to the underlying docker-client library. Here is an open issue for the same: https://github.com/spotify/docker-client/issues/946