kafka docker-compose.yml 启动

version: ‘2’
services:
zookeeper:
image: wurstmeister/zookeeper ## 镜像
ports:
- “2181:2181” ## 对外暴露的端口号
#network_mode: “host”
kafka:
image: wurstmeister/kafka ## 镜像
volumes:
- /etc/localtime:/etc/localtime ## 挂载位置(kafka镜像和宿主机器之间时间保持一直)
ports:
- “9092:9092”
#network_mode: “host”
environment:
KAFKA_ADVERTISED_HOST_NAME: 61.130.. ## 修改:宿主机IP
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 ## 卡夫卡运行是基于zookeeper的
kafka-manager:
image: sheepkiller/kafka-manager ## 镜像:开源的web管理kafka集群的界面
environment:
ZK_HOSTS: 61.130.. ## 修改:宿主机IP
#network_mode: “host”
ports:
- “9000:9000”

你可能感兴趣的:(docker,中间件)