I have installed kafka on docker with following yml
version: "3"
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'bitnami/kafka:latest'
ports:
- '9092:9092'
- '9093:9093'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://myserver.com:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
i installed kafkacat on machine (linux on wsl2),dockerapp_zookeeper_1 is container for zookeper, and trying to run
docker exec -t dockerapp_zookeeper_1 \
zookeeper-shell.sh \
localhost:2181 \
ls /brokers/ids
i am getting error
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "zookeeper-shell.sh": executable file not found in $PATH: unknown
file is there i checked , why i am getting this error, do i need to install kafkacat on docker itself ?