Bootstrap

docker 部署单机kafka

zookeeper服务

docker run -d --name zookeeper -p 2181:2181 wurstmeister/zookeeper:latest

kafka服务

docker run -d --name kafka -p 9092:9092 -p 9093:9093 -e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 -e KAFKA_ADVERTISED_LISTENERS=INSIDE://kafka:9093,OUTSIDE://localhost:9092 -e KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT -e KAFKA_LISTENERS=INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092 -e KAFKA_INTER_BROKER_LISTENER_NAME=INSIDE --depends-on zookeeper wurstmeister/kafka:latest

kafka-ui服务

docker run -d --name kafka-ui -p 9001:8080 --depends-on zookeeper --depends-on kafka -e KAFKA_CLUSTERS_0_NAME=local -e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9093 -e KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181 --restart always provectuslabs/kafka-ui:latest

;