summaryrefslogtreecommitdiffstats
path: root/src/main/docker/broker-list.sh
diff options
context:
space:
mode:
authorsunil unnava <su622b@att.com>2018-08-24 00:35:14 -0400
committersunil unnava <su622b@att.com>2018-08-24 00:36:47 -0400
commit437dbc12410e956076bc067b8cc9e67de2b35b37 (patch)
treee5cd1eb50b0b4929b0e556202fd715a219b2819d /src/main/docker/broker-list.sh
parentc49d2f158d852d2f308b77abdbad2328daa2ef9c (diff)
Create Kafka 0.11.0.1 docker image
Issue-ID: DMAAP-628 Change-Id: I3ad0c01d2778870734ccb1ed7daff39afbb18acc Signed-off-by: sunil unnava <su622b@att.com>
Diffstat (limited to 'src/main/docker/broker-list.sh')
-rw-r--r--src/main/docker/broker-list.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/docker/broker-list.sh b/src/main/docker/broker-list.sh
new file mode 100644
index 0000000..7f04639
--- /dev/null
+++ b/src/main/docker/broker-list.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+CONTAINERS=$(docker ps | grep 9092 | awk '{print $1}')
+BROKERS=$(for CONTAINER in $CONTAINERS; do docker port $CONTAINER 9092 | sed -e "s/0.0.0.0:/$HOST_IP:/g"; done)
+echo $BROKERS | sed -e 's/ /,/g'