docker-compose部署kafka并用kafka-tools
docker-kafka.yml
version: '2'
services:
zookeeper:
container_name: "zookeeper"
image: wurstmeister/zookeeper
volumes:
# zk数据文件路径。 宿主机路径:容器路径
- /Users/jathamchen/docker/zk-data:/data
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
container_name: "kafka"
ports:
- "9092:9092"
expose:
- "9093"
environment:
- KAFKA_ADVERTISED_HOST_NA
共有 0 条评论