samalba / dockerclient

Docker client library in Go
http://www.docker.com/
Apache License 2.0
320 stars 140 forks source link

Add NetworkSettings field to /containers/json response #198

Closed ahmetb closed 8 years ago

ahmetb commented 8 years ago

@abronan Hello, I am adding the NetworkSettings>Networks property I introduced in Docker Remote API v1.22 and I will integrate this to Swarm afterwards by updating vended package.

More info: https://github.com/docker/docker/pull/18559

My end goal is to find out which network each container is in along with its IP address in /containers/json response (otherwise I need to query each container's info individually) so that with wagl I can provide seamless name resolution for containers in the same overlay network.

Copied EndpointSettings from here.

abronan commented 8 years ago

Thanks @ahmetalpbalkan,

SGTM when docker/docker#18559 will be merged

ahmetb commented 8 years ago

@abronan that's now merged.

thaJeztah commented 8 years ago

Thanks @ahmetalpbalkan!

abronan commented 8 years ago

LGTM

ping @vieux @ehazlett

vieux commented 8 years ago

LGTM

ahmetb commented 8 years ago

Thanks! I'm having trouble updating the vended version at docker/swarm, I'm getting a nasty error from godep: https://github.com/tools/godep/issues/372.

I tried to do it manually but it's not trivial. The new version of dockerclient comes with github.com/docker/go-units, which needs to be vended as well, and other code using docker/docker/pkg/units should move to this (and thus remove dependency to docker/docker/pkg/units).

If one of you could try, I really appreciate.

abronan commented 8 years ago

@ahmetalpbalkan PTAL docker/swarm#1558.

We are updating Godeps as there are a lot of stuff under docker/pkg being moved into their own repository.