Sign inSign up

syhily/kafka

By syhily

•Updated over 9 years ago

Kafka 0.8 (and Zookeeper、Offset Monitor) in Docker

Image
1

1.6K

syhily/kafka repository overview

⁠Kafka in Docker

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

For convenience also contains a offset monitor.

⁠Why?

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

⁠Run

docker run -p 2181:2181 -p 9092:9092 -p 28080:28080--env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 --name kafka -d syhily/kafka
export KAFKA=`docker-machine ip \`docker-machine active\``:9092
kafka-console-producer.sh --broker-list $KAFKA --topic test
export ZOOKEEPER=`docker-machine ip \`docker-machine active\``:2181
kafka-console-consumer.sh --zookeeper $ZOOKEEPER --topic test

⁠Offset Monitor

Visit http://127.0.0.1:28080⁠

⁠In the box

  • syhily/kafka

    The docker image with both Kafka and Zookeeper. Built from the kafka directory.

⁠Public Builds

https://registry.hub.docker.com/u/syhily/kafka⁠

⁠Build from Source

docker build -t syhily/kafka .

⁠Todo

  • Not particularily optimzed for startup time.
  • Better docs
  • Offset Monitor

Tag summary

Content type

Image

Digest

Size

217.3 MB

Last updated

over 9 years ago

docker pull syhily/kafka