Sign inSign up

gg77/kafka

By gg77

•Updated over 8 years ago

Single-node Kafka and Zookeeper in 1 container; vastly improved fork of spotify/docker-kafka

Image
0

10K+

gg77/kafka repository overview

DockerHub pulls

⁠About

Single-broker Kafka⁠ + single-node Zookeper⁠ in one Docker container, managed by supervisord⁠.

Forked from spotify/docker-kafka⁠. Improvements:

  • Kafka/Zookeeper output is shown on stdout/stderr (see veithen's blog⁠)
  • You can override any broker configuration setting through environment variables
  • Uses the bundled Zookeeper in Kafka, instead of the one in apt (smaller Docker image)
  • The base image can now be easily changed (e.g. newer ubuntu)
  • Kafka logs are kept on a VOLUME, giving us better IO performance
  • Simplified and improved Dockerfile, kafka startup script, and supervisord config
  • Doesn't run as root
  • No "proxy" or "helios"⁠ bloat

⁠Getting the image

To build (note: the --build-arg options are not actually required):

docker build --tag gg77/kafka --build-arg SCALA_VERSION=2.11 --build-arg KAFKA_VERSION=0.10.1.1 .

Alternatively, pull latest from the gg77/kafka DockerHub repository⁠:

docker pull gg77/kafka

⁠Using the image

docker run --rm -it KAFKA_CONFIG_MESSAGE_MAX_BYTES=1337 --name kafka --hostname kafka gg77/kafka

Using the Kafka utilities:

docker exec -it kafka /home/kafka/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 4 --topic harambe

From another container:

docker run --rm -it --link kafka gg77/kafka /home/kafka/kafka/bin/kafka-topics.sh --describe --zookeeper kafka:2181

Tag summary

Content type

Image

Digest

Size

175.3 MB

Last updated

over 8 years ago

docker pull gg77/kafka