网上大多数是这个镜像
zookeeper镜像
docker pull wurstmeister/zookeeper
kafka镜像
docker pull wurstmeister/kafka
docker run -d -p 2181:2181 --name zookeeper zookeeper
docker run -d --name kafka -p 9092:9092
-e KAFKA_BROKER_ID=1
-e KAFKA_ZOOKEEPER_CONNECT=121.43.40.217:2181
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://121.43.40.217:9092
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 -t wurstmeister/kafka
-e KAFKA_BROKER_ID=0 在kafka集群中,每个kafka都有一个BROKER_ID来区分自己
-e KAFKA_ZOOKEEPER_CONNECT=121.43.40.217:2181 kafka 配置zookeeper管理kafka的路径121.43.40.217:2181/kafka
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://121.43.40.217:9092 把kafka的地址端口注册给zookeeper
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 配置kafka的监听端口
docker部署redis docker run -itd --name redis-test -p 6379:6379 redis
docker部署rabbitmq
docker pull rabbitmq
docker run -d --hostname my-rabbit --name rabbit -p 15672:15672 -p 5672:5672 rabbitmq
标签:121.43,单机,zookeeper,9092,KAFKA,docker,kafka From: https://www.cnblogs.com/tomwulog/p/16433932.html