Skip to content

Commit

Permalink
Fixes advertised.host.name resolution in Docker 1.10.0
Browse files Browse the repository at this point in the history
`start.sh` should now correctly pick up the container's IP, no
matter where it shows up in `/etc/hosts`, instead of expecting
it to be in the first line

Resolves ches#13
  • Loading branch information
davidgiesberg committed Feb 9, 2016
1 parent a0a2931 commit d022504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[ -n "$ZOOKEEPER_PORT_2181_TCP_ADDR" ] && ZOOKEEPER_IP=$ZOOKEEPER_PORT_2181_TCP_ADDR
[ -n "$ZOOKEEPER_PORT_2181_TCP_PORT" ] && ZOOKEEPER_PORT=$ZOOKEEPER_PORT_2181_TCP_PORT

IP=$(cat /etc/hosts | head -n1 | awk '{print $1}')
IP=$(grep ${HOSTNAME} /etc/hosts | awk '{print $1}')

# Concatenate the IP:PORT for ZooKeeper to allow setting a full connection
# string with multiple ZooKeeper hosts
Expand Down

0 comments on commit d022504

Please sign in to comment.