Sign inSign up

scrapinghub/kafka

By scrapinghub

Updated over 9 years ago

Image
1

1.9K

scrapinghub/kafka repository overview

kafka-docker

Dockerfile for Apache Kafka

The image is available directly from https://registry.hub.docker.com/

##Pre-Requisites

  • install docker-compose https://docs.docker.com/compose/install/
  • modify the KAFKA_ADVERTISED_HOST_NAME in docker-compose.yml to match your docker host IP (Note: Do not use localhost or 127.0.0.1 as the host ip if you want to run multiple brokers.)
  • if you want to customise any Kafka parameters, simply add them as environment variables in docker-compose.yml, e.g. in order to increase the message.max.bytes parameter set the environment to KAFKA_MESSAGE_MAX_BYTES: 2000000. To turn off automatic topic creation set KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'

##Usage

Start a cluster:

  • docker-compose up -d

Add more brokers:

  • docker-compose scale kafka=3

Destroy a cluster:

  • docker-compose stop

##Note

The default docker-compose.yml should be seen as a starting point. By default each broker will get a new port number and broker id on restart. Depending on your use case this might not be desirable. If you need to use specific ports and broker ids, modify the docker-compose condocker-composeuration accordingly, e.g. docker-compose-single-broker.yml:

  • docker-compose -f docker-compose-single-broker.yml up

##Tutorial

http://wurstmeister.github.io/kafka-docker/

Tag summary

Content type

Image

Digest

sha256:0ddd4b32f

Size

220 MB

Last updated

almost 11 years ago

docker pull scrapinghub/kafka