https://github.com/foxcapades/docker-apache-kafka
Dockerized Apache Kafka
https://github.com/foxcapades/docker-apache-kafka
apache docker kafka
Last synced: about 1 year ago
JSON representation
Dockerized Apache Kafka
- Host: GitHub
- URL: https://github.com/foxcapades/docker-apache-kafka
- Owner: Foxcapades
- License: mit
- Created: 2023-02-27T01:04:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-10T16:24:58.000Z (almost 3 years ago)
- Last Synced: 2025-04-06T11:48:37.972Z (over 1 year ago)
- Topics: apache, docker, kafka
- Homepage: https://hub.docker.com/r/foxcapades/apache-kafka
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.adoc
- License: license
Awesome Lists containing this project
README
= Containerized Apache Kafka (KRaft)
:source-highlighter: highlightjs
:kafka-docs-url: https://kafka.apache.org/documentation/
A simple Docker image for Apache Kafka using KRaft.
link:https://hub.docker.com/r/foxcapades/apache-kafka[On DockerHub]
== Usage
[source, bash]
----
docker run -p 9092:9092 foxcapades/apache-kafka:3.4.0
----
== Configuration
=== Environment
==== Container Config
The following options are provided as part of the Docker container and are not
part of Apache Kafka.
[%header, cols=3]
|===
| Option | Type | Default
m| KAFKA_SERVER_PROPERTIES_FILE
m| string
m| /opt/kafka/server.properties
m| KAFKA_CLUSTER_ID
m| string
m|
|===
==== `server.properties`
All Kafka configuration options listed in the
link:{kafka-docs-url}#brokerconfigs[official documentation] may be configured
using environment variables. The environment variable to set for a specific
option may be looked up in the
link:https://github.com/Foxcapades/docker-apache-kafka/blob/3.4.0/server.properties.sh[]
file, or by performing the following mapping steps:
1. Convert the property name to uppercase
2. Replace all period (`.`) characters with underscore (`_`) characters
3. Prepend the prefix `KAFKA_`
.Property to Environment Mapping Snippet
[source, kotlin]
----
fun mapPropertyNameToEnvironmentKey(property: String) =
"KAFKA_" + property.uppercase().replace('.', '_')
----
==== Defaults
The following defaults are set if no environment variables are specified.
[%header, cols="3m,7m"]
|===
| Property | Default
| advertised.listeners
| PLAINTEXT://localhost:9092
| controller.listener.names
| CONTROLLER
| controller.quorum.voters
| 1@localhost:9093
| inter.broker.listener.name
| PLAINTEXT
| listeners
| PLAINTEXT://:9092,CONTROLLER://:9093
| log.dirs
| /tmp/kafka
| node.id
| 1
| offsets.topic.replication.factor
| 1
| process.roles
| broker,controller
| transaction.state.log.min.isr
| 1
| transaction.state.log.replication.factor
| 1
|===