mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:50 +02:00
6 lines
210 B
Bash
Executable File
6 lines
210 B
Bash
Executable File
#!/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/$'\n'/,}"
|