dark0dave / kraft-docker

OCI compliant images for kafka running KRAFT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Pulls Docker Stars Build Status

kafka-docker

Dockerfile for Apache Kafka running kraft. Because I hate zookeeper.

The image is available directly from Docker Hub

Usage

docker build -t kafka .
docker run -it -p 9092:9092 kafka

This runs kafka without zookeeper in a single instance mode, topics are created automatically there is no need to create them beforehand.

Auto create topics

Can create topics at start time with the following:

docker run -it -e KAFKA_CREATE_TOPICS=topic1:1:1,topic2:1:1 -p 9092:9092 kafka

Logging

Logging can be controlled with, the runtime environment varriable LOG4J_LOGGER_KAFKA.

Log levels available:

Level Description
OFF Turns off logging.
FATAL Severe errors that cause premature termination.
ERROR Other runtime errors or unexpected conditions.
WARN Runtime situations that are undesirable or unexpected, but not necessarily wrong.
INFO Runtime events of interest at startup and shutdown.
DEBUG Detailed diagnostic information about events.
TRACE Detailed diagnostic information about everything.

Example below:

docker run -it --rm -e LOG4J_LOGGER_KAFKA=DEBUG -p 9092:9092 kafka

About

OCI compliant images for kafka running KRAFT

License:Apache License 2.0


Languages

Language:Shell 81.0%Language:Dockerfile 19.0%