mirror of https://github.com/apache/druid.git
Fix DOCKER_HOST_IP handling for multihomed machines. (#9225)
By picking one. Otherwise, when a machine has multiple IP addresses, DOCKER_HOST_IP would have a newline in the middle, causing havoc in configuration files.
This commit is contained in:
parent
8011211a0c
commit
f511af1306
|
@ -18,7 +18,7 @@
|
|||
DOCKER_HOST_IP="$(host "$(hostname)" | perl -nle '/has address (.*)/ && print $1')"
|
||||
if [ -z "$DOCKER_HOST_IP" ]; then
|
||||
# Mac specific way to get host ip
|
||||
DOCKER_HOST_IP="$(dscacheutil -q host -a name "$(HOSTNAME)" | perl -nle '/ip_address: (.*)/ && print $1')"
|
||||
DOCKER_HOST_IP="$(dscacheutil -q host -a name "$(HOSTNAME)" | perl -nle '/ip_address: (.*)/ && print $1' | tail -n1)"
|
||||
fi
|
||||
|
||||
if [ -z "$DOCKER_HOST_IP" ]; then
|
||||
|
|
Loading…
Reference in New Issue