Public | Automated Build

Last pushed: a year ago
Short Description
Simple Kafka​ 0.9.0.0/zookeeper container for testing
Full Description

THIS IS FORKED FROM SPOTIFY/DOCKER AND UPDATED FOR KAFKA 0.9.0.0

Kafka 9 in Docker

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

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 --env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 cbassham/docker-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

In the box

  • cbassham/docker-kafka

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

Build from Source

docker build -t cbassham/docker-kafka kafka/
Docker Pull Command
Owner
cbassham
Source Repository

Comments (0)