Lightweight Apache Kafka (KRaft mode) optimized for 32-bit ARM (arm/v7) devices like Raspberry Pi.
80
A lightweight, standalone Apache Kafka container image built natively for 32-bit ARM (linux/arm/v7) Single Board Computers (such as Raspberry Pi 2, Raspberry Pi 3 running 32-bit OS, DietPi, Armbian).
eclipse-temurin:17-jre-jammy—one of the few modern OpenJDK 17 runtimes that still maintains official 32-bit ARM binaries.9092: Internal container-to-container listener (PLAINTEXT).9094: External LAN/host listener (EXTERNAL).docker run -d \
--name kafka \
-p 9092:9092 \
-p 9094:9094 \
-e KAFKA_HEAP_OPTS="-Xms160m -Xmx160m" \
-e KAFKA_EXTERNAL_HOST="192.168.1.100" \
-v kafka-data:/var/lib/kafka/data \
kaustubh456/kafka-armv7:latest
services:
kafka:
image: kaustubh456/kafka-armv7:latest
container_name: kafka
restart: unless-stopped
ports:
- "9092:9092" # Internal / local port
- "9094:9094" # External LAN port
environment:
# Critical for 1GB RAM SBCs: prevent default 1GB JVM heap allocation
KAFKA_HEAP_OPTS: "-Xms160m -Xmx160m"
# Set to your device's LAN IP for remote consumers/producers
KAFKA_EXTERNAL_HOST: "192.168.1.109"
mem_limit: 256m
memswap_limit: 384m
volumes:
- kafka-data:/var/lib/kafka/data
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "9092"]
interval: 15s
timeout: 5s
retries: 10
start_period: 60s
volumes:
kafka-data:
| Variable | Default | Description |
|---|---|---|
KAFKA_EXTERNAL_HOST | localhost | The LAN IP address or hostname that external network clients use to connect to port 9094. |
KAFKA_HEAP_OPTS | -Xms1G -Xmx1G | JVM memory allocation. Set to -Xms160m -Xmx160m on 1GB RAM devices. |
9092 — Internal listener (PLAINTEXT://kafka:9092)9093 — KRaft controller listener (CONTROLLER)9094 — External network listener (EXTERNAL://${KAFKA_EXTERNAL_HOST}:9094)/var/lib/kafka/data — Persistent storage for Kafka commit logs and KRaft cluster metadata.Once the container is running, verify it by creating a test topic and sending a message using Kafka's built-in CLI:
# 1. Create a test topic
docker exec -it kafka /opt/kafka/bin/kafka-topics.sh \
--create --topic test-topic --bootstrap-server localhost:9092
# 2. Produce a message (type a message and hit Enter, then Ctrl+C to exit)
docker exec -it kafka /opt/kafka/bin/kafka-console-producer.sh \
--topic test-topic --bootstrap-server localhost:9092
# 3. Consume the message
docker exec -it kafka /opt/kafka/bin/kafka-console-consumer.sh \
--topic test-topic --from-beginning --bootstrap-server localhost:9092
Content type
Image
Digest
sha256:538e737a1…
Size
343.2 MB
Last updated
about 1 month ago
docker pull kaustubh456/kafka-armv7