Home > Enterprise >  Grafana from docker image: can't enter grafana homepage at localhost
Grafana from docker image: can't enter grafana homepage at localhost

Time:11-06

I successfully run Grafana-server from image. Docker-compose:

version: '2.1'

   services:

      grafana:
        image: grafana/grafana:6.7.2
        container_name: grafana
        ports:
        - '3000:5432'

Last entry of log output:

HTTP Server Listen    logger=http.server address=[::]:3000 protocol=http subUrl= socket=

But I can't enter in Grafana-IU at http://localhost:3000. Error: "Cant connect to server localhost"

CodePudding user response:

By default, the Grafana image listens on port 3000, so you need to map port 3000 to whatever port you want to use on the host. If you want to use port 3000 like it looks like from what you've tried, both port numbers should be 3000 like this

version: '2.1'

   services:

      grafana:
        image: grafana/grafana:6.7.2
        container_name: grafana
        ports:
        - '3000:3000'
  • Related