Run Apache Kafka cluster in docker containers and support multi-node cluster.
/kafka is exposed as the data directory, to be linked to a host directory.
Environment variables starting with
KAFKA_ will be converted into proper Kafka configuration options, e.g.
KAFKA_MESSAGE_MAX_BYTES will be converted to
The following environment variables are good to know.
KAFKA_ADVERTISED_HOST_NAMEThis is required to be the IP address of the docker host. For example, on OSX, if using docker-machine with the default driver, it's the address 192.168.99.100.
KAFKA_ADVERTISED_PORTDefault to be 9092
KAFKA_BROKER_IDIf unspecified, 0.
KAFKA_LOG_DIRSIf unspecified, default will be
KAFKA_ZOOKEEPER_CONNECTComma-delimited zookeeper addresses. If unspecified, default will be
zookeeper, i.e. the name for the linked zookeeper container (e.g. using docker-compose and named the linked zookeeper