【发布时间】:2021-11-05 12:42:00
【问题描述】:
我成功地从镜像运行 Grafana-server。 码头工人撰写:
version: '2.1'
services:
grafana:
image: grafana/grafana:6.7.2
container_name: grafana
ports:
- '3000:5432'
日志输出的最后一条:
HTTP Server Listen logger=http.server address=[::]:3000 protocol=http subUrl= socket=
但我无法通过 http://localhost:3000 进入 Grafana-IU。错误:“无法连接到服务器 localhost”
【问题讨论】:
-
http://localhost:3000? -
是的,这是我的问题中的一个错误,当然 - localhost:3000。但本质不变——错误依旧。
-
为什么要将 Grafana 端口映射到 PostgreSQL?
-
我能够使用 PostgreSQL 数据库中的数据构建 Grafana 仪表板。而且PostgreSQL不是部署在容器上,而是部署在宿主机上