Skip to content

Instantly share code, notes, and snippets.

@erhwenkuo
Created August 13, 2018 08:16
Show Gist options
  • Save erhwenkuo/7b72c2464419ab5806a7332005ae41e8 to your computer and use it in GitHub Desktop.
Save erhwenkuo/7b72c2464419ab5806a7332005ae41e8 to your computer and use it in GitHub Desktop.
ak-training-env-docker
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.0.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:5.0.0
hostname: kafka
ports:
- '9092:9092'
- '29092:29092'
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
# Following line is needed for Kafka versions 0.11+
# in case you run less than 3 Kafka brokers in your
# cluster because the broker config
# `offsets.topic.replication.factor` (default: 3)
# is now enforced upon topic creation
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment