Public | Automated Build

Last pushed: a year ago
Short Description
Image running Kafka bundled with Zookeeper (using Supervisor).
Full Description

Kafka Docker Image

This image runs both Zookeeper and Kafka, using Supervisor,
in the same container. No need for setting up an external Zookeeper host, or linking to another container.


Run Kafka using docker-toolbox:

docker run -p 2181:2181 -p 9092:9092 -e ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` -e ADVERTISED_PORT=9092 nicolaihald/goo.kafka

Environment variables:

ENV Comment
ADVERTISED_HOST The external ip for the container, e.g. "docker-machine ip `docker-machine active`"
ADVERTISED_PORT The external port for Kafka, e.g. 9092
ZK_CHROOT The zookeeper chroot that's used by Kafka (without / prefix), e.g. "kafka"
LOG_RETENTION_HOURS The minimum age of a log file in hours to be eligible for deletion (default is 168, for 1 week)
LOG_RETENTION_BYTES Configure the size at which segments are pruned from the log, (default is 1073741824, for 1GB)
NUM_PARTITIONS Configure the default number of log partitions per topic


The container exposes two volumes that you may wish to bind-mount, or process elsewhere with --volumes-from:

VOL Comment
/tmp/kafka-logs Path where Kafka's data is stored ( => log.dirs)
/opt/kafka/logs Path where Kafka's logs (INFO level) will be written, via log4j ( => kafka.logs.dir)
Docker Pull Command
Source Repository

Comments (0)