Public | Automated Build

Last pushed: a year ago
Short Description
Docker images for development, with embedded zookeeper. Forked from spotify!
Full Description

Kafka in Docker

This repository provides everything you need to run Kafka in Docker.


The main hurdle of running Kafka in Docker is that it depends on Zookeeper.
Compared to other Kafka docker images, this one runs both Zookeeper and Kafka
in the same container. This means:

  • No dependency on an external Zookeeper host, or linking to another container
  • Zookeeper and Kafka are configured to work together out of the box


Any kafka property can be set by using an env variable prefixed by _KAFKA_. All the . in the property name have to be replaced by _ (bash env variables can not contain .)

docker run -p 2181:2181 -p 9092:9092 --env _KAFKA_advertised_host_name=`docker-machine ip \`docker-machine active\`` --env _KAFKA_advertised_port=9092 flozano/kafka
export KAFKA=`docker-machine ip \`docker-machine active\``:9092 --broker-list $KAFKA --topic test
export ZOOKEEPER=`docker-machine ip \`docker-machine active\``:2181 --zookeeper $ZOOKEEPER --topic test

Public Builds

Build from Source

docker build -t flozano/kafka kafka/


  • Not particularily optimzed for startup time.
  • Better docs
Docker Pull Command
Source Repository