make the service example work #346

Merged
merged 2 commits into from Apr 9, 2013

Projects

None yet

4 participants

@srid

issue #98 suggests that connecting to localhost (which hostname may resolve to) will not work.

srid added some commits Apr 7, 2013
@srid srid make the service example work
issue #98 requires connecting to localhost (which `hostname` may resolve to) will not work.
27feba4
@srid srid sync with README 9875a9b
@bryanhelmig

+1 Helped me, $(hostname) didn't work.

@shykes shykes merged commit 0767916 into docker:master Apr 9, 2013
@srid srid deleted the srid:patch-2 branch Apr 9, 2013
@jpetazzo

I'm suggesting this instead:

ip -f inet addr show scope global | sed -n 's/.*inet \([^ /]*\)[ /].*/\1/p' | tail -n 1

This should list all the "global scope" IPV4 addresses (i.e. not 127.X.Y.Z, multicast, etc.); meaning that if someone doesn't have an address on eth0, it should work anyway. (That's the case with some high-end bare metal providers, where eth0 is part of a bond group, and doesn't hold an address by itself).

HTH,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment