A Kafka 0.10.0.0/Zookeeper docker image based on spotify/docker-kafka
383
This file was changed from the original, spotify version
This repository provides everything you need to run Kafka in Docker.
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:
Run the docker image with the name "kafka"
docker run --name kafka -it matrixsolutions/kafka:0.10.0.0
Create a test topic
docker exec -it kafka /opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
Startup a console consumer
docker exec -it kafka /opt/kafka/bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning
In a new terminal, startup a console producer
docker exec -it kafka /opt/kafka/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
Now, anything you enter into the producer should appear in the consumer.
matrixsolutions/kafka
The docker image with both Kafka and Zookeeper. Built from the kafka
directory.
https://hub.docker.com/r/matrixsolutions/kafka/
docker build -t kafka .
Content type
Image
Digest
Size
246.2 MB
Last updated
about 10 years ago
docker pull matrixsolutions/kafka:0.10.0.0