Sign inSign up

deciphernow/kafka

By deciphernow

Updated about 6 years ago

An Kafka image suitable for local development or deployment.

Image
1

100K+

deciphernow/kafka repository overview

Kafka

This directory provides the scripts and configuration files for building Docker containers that run Apache ZooKeeper and Apache Kafka in the same container. While in theory, you should have one process per container, in practice it's often less messy to run two dependent processes in the same container.

Building

In order to build an image simply run the following command from this directory:

./build.sh

This script will build a new Docker image with sensible defaults, but you may override them with the following environment variables:

VariableDefaultDescription
KAFKA_MIRRORhttp://www-us.apache.org/dist/kafkaThe mirror from which Kafka is downloaded.
KAFKA_VERSION2.1.0The version of Kafka.
SCALA_VERSION2.11The version of Scala used by Kafka.

Be sure to confirm that your ZooKeeper version is compatible with your Kafka version.

Publishing

To build and publish the built image simply run the following command from this directory:

./publish.sh

This script accepts the same environment variables as the as the build script.

Running

To run an image build using this repository run the following command:

docker run deciphernow/kafka:2.11-2.1.0

This will start Kafka on localhost:9092 and ZooKeeper on localhost:2181. Since this may not be desirable, you may override any of these by setting the following environment variables in your run command:

VariableDefaultDescription
KAFKA_HOSTlocalhostThe hostname which resolves to the Kafka container.
KAFKA_PORT9092The port on which Kafka listens.
ZOOKEEPER_CONNECTIONlocalhost:2181A comma separated host:port pairs string for zk
HOSTNAMElocalhost-0(optional) If running more than one kafka node, pass in this variable in a hostname-index format to specify the broker id

Tag summary

Content type

Image

Digest

Size

234.8 MB

Last updated

over 7 years ago

docker pull deciphernow/kafka