Docker Community Forums

Share and learn in the Docker community.

Kafka don't work on latest Mac OS and M1 CPU

Hi! My problem: i starting kafka-zookeeper by docker-compose, config:

version: “3”
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- “2181:2181”

kafka:
image: wurstmeister/kafka
ports:
- “9092:9092”
environment:
- KAFKA_BROKER_ID=0
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181

Container running, i going to kafka container’s bash and try to create topic by command:
/.kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 1 --topic Topic1

But i don’t get any response on this command, kafka doesn’t work.

This docker-compose config works good on Linux, Mac with intel chip and windows.
How can i fix that? I can not working without working kafka…