docker-compose错误cant find a suitable configuration....
kafka和zookeeper安装步骤1.mkdir -p /srv/kafka2. vim /srv/kafka/docker-compose.ymldocker-compose.yml内容如下version: '2'services:zookeeper:image: wurstmeister/zookeeper...
·
kafka和zookeeper安装步骤
1.mkdir -p /srv/kafka
2. vim /srv/kafka/docker-compose.yml
docker-compose.yml内容如下
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.5.130 //注意修改ip
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
3.docker-compose up -d
4.# 注意修改zk地址,账号和密码
docker run -d -p 9000:9000 -e ZK_HOSTS="192.168.5.130:2181" \
-e APPLICATION_SECRET=letmein \
-e KM_USERNAME=admin -e KM_PASSWORD=admin \
sheepkiller/kafka-manager
执行第三步的时候报错
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
解决办法:
1.cd /srv/kafka //先进入docker-compose.yml所在目录
2.然后在执行 docker-compose up -d
更多推荐
已为社区贡献1条内容
所有评论(0)