deployable/kafka:latest - kafka:2.12-2.1.0
deployable/kafka:2.1
deployable/kafka:2.0
deployable/kafka:1.1
deployable/kafka:2.12-2.1.0
deployable/kafka:2.11-2.1.0
deployable/kafka:2.12-2.0.1
deployable/kafka:2.11-2.0.1
deployable/kafka:2.12-1.1.1
deployable/kafka:2.11-1.1.1
ADVERTISE_LISTENERS
The quickest way is to launch with the included compose file
docker-compose up -d
Create a network
docker network create zk
Run zookeeper
docker run --net=zk \
--hostname zookeeper \
--publish 2181:2181/tcp \
--detach \
deployable/kafka \
zookeeper
Run kafka
docker run --net=zk \
--publish 9092:9092/tcp \
--detach \
deployable/kafka \
kafka
If you want kafka to advertise an address other than localhost, set the
ADVERTISE_LISTENERS
environment variable in docker to something like my.kafka.host:9091
docker run --net=zk \
--env ADVERTISE_LISTENERS=hostname:port
--detach \
deployable/kafka \
kafka