Skip to content

Instantly share code, notes, and snippets.

@shinux
Last active September 15, 2021 12:43
Show Gist options
  • Save shinux/71583d7db34f8cfdccdc8125ec961f25 to your computer and use it in GitHub Desktop.
Save shinux/71583d7db34f8cfdccdc8125ec961f25 to your computer and use it in GitHub Desktop.
mac m1 (Apple Silicon) docker kafka (include zookeeper)
version: "2"
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: docker.io/bitnami/kafka:2
ports:
- "9092:9092"
volumes:
- "kafka_data:/bitnami"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
depends_on:
- zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
@shinux
Copy link
Author

shinux commented Sep 15, 2021

start with docker-compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment