- 启动Zookeeper
docker run -d --name zookeeper -p 2181:2181 -t zookeeper:3.7.0
- 启动Kafka
docker run -d --name kafka \
-p 9092:9092 \
-e KAFKA_BROKER_ID=0 \
-e KAFKA_ZOOKEEPER_CONNECT=172.16.90.241:2181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://172.16.90.241:9092 \
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 -t wurstmeister/kafka:2.13-2.7.0
3.启动页面管理端
docker run -itd \
--restart=always \
--name=kafka-manager \
-p 9000:9000 \
-e ZK_HOSTS="172.16.101.160:2181" \
kafkamanager/kafka-manager:3.0.0.4