coreos/etcd — pull request #885 by cap10morgan (2014-07-09 15:40:43+00:00)
Title: improve the out-of-box experience for people using coreos/etcd container

Currently spinning up one container with `docker run coreos/etcd` will allow
you to connect (etcd is listening on the container's eth0 IP), but many
client libraries will generate strange errors because the advertised addresses
default to 127.0.0.1.

It would be unfortunate if people decided etcd wasn't worth the trouble
just because they couldn't get the simplest-possible configuration working.

This can be easily fixed in this
single-container-with-no-additional-args scenario by adding a wrapper
script that looks up the container's eth0 IP and advertises that.

It still allows overriding if -addr and/or -peer-addr are supplied in
the docker run call.