April 2018
Intermediate to advanced
432 pages
10h 38m
English
Unfortunately, there is no official Docker image with Apache Kafka. However, we may use one that is unofficial, for example, that shared by Spotify. In comparison to other available Kafka docker images, this one runs both Zookeeper and Kafka in the same container. Here's the Docker command that launches Kafka and exposes it on port 9092. Zookeeper is also available outside on port 2181:
docker run -d --name kafka -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=192.168.99.100 --env ADVERTISED_PORT=9092 spotify/kafka