Skip to content

Instantly share code, notes, and snippets.

@rsmnarts
Created September 21, 2021 14:54
Show Gist options
  • Save rsmnarts/4546b687cf4c68e573f0e5afca60635d to your computer and use it in GitHub Desktop.
Save rsmnarts/4546b687cf4c68e573f0e5afca60635d to your computer and use it in GitHub Desktop.
version: '3'
services:
zookeeper:
container_name: zookeeper
image: wurstmeister/zookeeper
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
container_name: kafka
image: wurstmeister/kafka:2.11-1.1.1
ports:
- '9094:9094'
environment:
- KAFKA_BROKER_ID=0
- KAFKA_ADVERTISED_HOST_NAME=ip-vm/localhost
- KAFKA_LISTENERS=PLAINTEXT://:9094
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://ip-vm/localhost:9094
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_DELETE_TOPIC_ENABLE=true
depends_on:
- zookeeper
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment