Simple docker-compose.yaml file:
version: '3.3'
services:
zookeeper:
image: 'zookeeper:latest'
ports:
- '2181:2181'
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: 'bitnami/kafka:latest'
depends_on:
- zookeeper
ports:
- '9092:9092'
environment:
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_CFG_LOG_RETENTION_HOURS: 72
KAFKA_CFG_MESSAGE_MAX_BYTES: 10485760
ALLOW_PLAINTEXT_LISTENER: "yes"
kafka-manager:
image: 'provectuslabs/kafka-ui:latest'
depends_on:
- kafka
- zookeeper
ports:
- "9000:8080"
environment:
KAFKA_CLUSTERS_0_NAME: "local"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:9092"
KAFKA_CLUSTERS_0_ZOOKEEPER: "zookeeper:2181"
volumes:
esdata:
driver: local
http://servername:9000 – Kafka Manager