linux
kafka
安装ZK
docker run --name zookeeper --restart always -d zookeeper
安装kafka
此处KAFKA_ADVERTISED_LISTENERS 需要客户端能访问到的ip地址
docker run -d --name kafka \
--link zookeeper \
-p 9092:9092 \
-e KAFKA_BROKER_ID=0 \
-e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://10.8.0.11:9092 \
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 wurstmeister/kafka