Skip to content

wlsc/docker-kafka

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 

Repository files navigation

Kafka in Docker

This repository provides everything you need to run Kafka (without a Zookeeper, with KRaft support) in Docker environment. Image is based on the latest stable Eclipse Temurin (OpenJDK image was deprecated by RedHat).

Note

Starting with version 3.4.0, simple tag and tag with -kraft add-on are the same builds.

Run

docker run -d -p 9092:9092 --name kafka wlsc/kafka

Kafka Producer

export KAFKA=$(docker-machine ip $(docker-machine active)):9092
kafka-console-producer.sh --broker-list $KAFKA --topic test

Kafka Consumer

kafka-console-consumer.sh --topic test --from-beginning --bootstrap-server localhost:9092

In the box

  • wlsc/kafka

    The docker image with both Kafka with KRaft. Built from the kafkadirectory.

Public Builds

https://registry.hub.docker.com/u/wlsc/kafka/

Build from Source (from folder /kafka)

docker buildx build --platform linux/arm64,linux/amd64 -t wlsc/kafka:latest .

Import single platform into Docker Desktop

docker buildx build --platform linux/arm64 -t wlsc/kafka:latest --load .

Source of Dockerfile

You can find it here https://github.com/wlsc/docker-kafka

Packages

No packages published

Languages

  • Shell 74.8%
  • Dockerfile 25.2%