Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Single node kafka
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.0.0-1-ubi8
restart: always
container_name: zookeeper
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-enterprise-kafka:6.0.0-1-ubi8
restart: always
container_name: kafka
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 101
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment