summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2022-02-27 21:43:40 -0500
committerAdam Kocoloski <kocolosk@apache.org>2022-02-27 21:43:40 -0500
commit95467f0995d528c047d9f2f273e5eaf510ea5690 (patch)
treeeb13068ff31dd4fd0b1b979c5bd011526e7273dc
parent6ead351c3e87f1b25e51db4ee57c5523a95b719b (diff)
downloadcouchdb-95467f0995d528c047d9f2f273e5eaf510ea5690.tar.gz
Use getent instead of dig to support container links
-rw-r--r--.devcontainer/create_cluster_file.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/.devcontainer/create_cluster_file.bash b/.devcontainer/create_cluster_file.bash
index c1bb959b8..47b2d20ac 100644
--- a/.devcontainer/create_cluster_file.bash
+++ b/.devcontainer/create_cluster_file.bash
@@ -34,7 +34,7 @@ function create_cluster_file() {
if [[ -n "$FDB_CLUSTER_FILE_CONTENTS" ]]; then
echo "$FDB_CLUSTER_FILE_CONTENTS" > $FDB_CLUSTER_FILE
elif [[ -n $FDB_COORDINATOR ]]; then
- coordinator_ip=$(dig +short $FDB_COORDINATOR)
+ coordinator_ip=$(getent hosts $FDB_COORDINATOR | awk {'print $1'})
if [[ -z "$coordinator_ip" ]]; then
echo "Failed to look up coordinator address for $FDB_COORDINATOR" 1>&2
exit 1