【发布时间】:2019-02-03 23:39:27
【问题描述】:
version: '3.4'
services:
kafka_exporter:
image: danielqsj/kafka-exporter
command: --kafka.server=xx.xx.xx.xx:9092 --kafka.server=xx.xx.xx.xx:9092
ports:
- 9308:9308
links:
- prometheus
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./mount/prometheus:/etc/prometheus
command: --config.file=/etc/prometheus/prometheus.yml
上面是我的docker-compose.yml 文件。
我可以旋转这两个图像。
但是,我无法从 localhost:9090 (prometheus) 访问 localhost:9308 (kafka_Exporter)
我需要链接/网络图像吗?
【问题讨论】:
-
当您说无法从 localhost:9090 (prometheus) 访问 localhost:9308 (kafka_Exporter) 时,您的意思是通过浏览器或内部从一个容器到另一个容器..?
-
通过浏览器。
标签: docker docker-compose dockerfile prometheus