mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
6 lines
210 B
Bash
6 lines
210 B
Bash
|
#!/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'/,}"
|