Skip to content

Instantly share code, notes, and snippets.

@shinux
Created April 24, 2020 02:42
Show Gist options
  • Save shinux/a9b973aea485be98174fd65942bcaa68 to your computer and use it in GitHub Desktop.
Save shinux/a9b973aea485be98174fd65942bcaa68 to your computer and use it in GitHub Desktop.
kafka & zookeeper docker compose
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
build: .
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
@shinux
Copy link
Author

shinux commented Apr 24, 2020

ports: should be 9092:9092

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