Sign inSign up

stden/kafka

By stden

•Updated 1 day ago

Run a single-node Apache Kafka broker in KRaft mode for message testing.

Image
Languages & frameworks
Integration & delivery
Developer tools
0

24

stden/kafka repository overview

⁠stden/kafka

Run a single-node Apache Kafka broker in KRaft mode for message testing.

⁠Contents

  • Apache Kafka 3 in KRaft mode (no ZooKeeper)
  • Kafka shell scripts at /opt/kafka/bin/
  • Client listener on port 9092

⁠Tags

TagMeaningPlatform
latestLatest successful main buildlinux/amd64

View tags and image digests⁠.

⁠Pull and run

docker pull stden/kafka:latest
docker run -d -p 127.0.0.1:9092:9092 --name kafka stden/kafka:latest

Wait for the broker to accept connections:

docker exec kafka /opt/kafka/bin/kafka-broker-api-versions.sh \
  --bootstrap-server localhost:9092

Create a topic and send a message:

docker exec kafka /opt/kafka/bin/kafka-topics.sh \
  --create --topic demo --bootstrap-server localhost:9092

echo "hello" | docker exec -i kafka \
  /opt/kafka/bin/kafka-console-producer.sh \
  --bootstrap-server localhost:9092 --topic demo

⁠Checks and source

CI builds the image and verifies the Kafka scripts are in place. The local test starts the broker, creates a topic, produces a message, and consumes it.

Dockerfile⁠ · Docker tutorial⁠ · Build results⁠

Tag summary

Content type

Image

Digest

sha256:5581882d8…

Size

227.8 MB

Last updated

1 day ago

docker pull stden/kafka