Skip to content

Commit b885615

Browse files
authored
Merge pull request #465 from lovoo/podman-support
add podman support
2 parents 11ff5eb + 0a00263 commit b885615

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

examples/wait-kafka.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
# $1: expects the hostname from docker compose and port in array form: localhost:9092,localhost:9093
66
#
77

8+
DOCKER_BIN=$([ docker --help ] && echo "docker" || echo "podman" )
9+
810
wait_for_kafka() {
911
IFS=','; for i in $1; do
1012
host="$(echo "$i" | cut -d':' -f1)"
1113
port="$(echo "$i" | cut -d':' -f2)"
12-
while ! docker exec -i ${host} sh -c "kafka-topics --bootstrap-server localhost:${port} --list"; do
14+
while ! ${DOCKER_BIN} exec -i ${host} sh -c "kafka-topics --bootstrap-server localhost:${port} --list"; do
1315
echo "Waiting for kafka '$i' to list topics..."
1416
sleep 5
1517
done

0 commit comments

Comments
 (0)