I installed the grafana container via docker as follows:
docker run -d --name=grafana \
--restart always \
-p 5000:3000 \
-e "GF_SERVER_PROTOCOL=http" \
-e "GF_SERVER_ROOT_URL=http://meuIP" \
-e "GF_SERVER_HTTP_PORT=3000" \
-v /docker/grafana/data:/var/lib/grafana \
grafana/grafana
But when I try to access it it will not go because it is not running on the IP that I want (myIP) and yes on 0.0.0.0
as shown below:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2c7246e98d99 grafana/grafana "/run.sh" About a minute ago Up 4 seconds 0.0.0.0:5000->3000/tcp grafana
In this case how do I route and access it by typing link in the browser?
EDIT:
I'm using CentOS7.
The version of Docker is:
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:06:25 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:06:25 2017
OS/Arch: linux/amd64
Experimental: false
Edited 2:
The problem is that from time to time the container gets status Exited (1)
seconds after I run it.
If I do this, it runs and I can access:
docker run \
-d \
-p 5200:3000 \
grafana/grafana
But I want to install the zabbix plugin as well. Alas, if I do it, it will take you after 10 seconds:
docker run -d \
-p 5100:3000 \
-e "GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app" \
grafana/grafana
I also want to redirect the data from the container to a specific folder so if there is anything wrong I can retrieve it.
If I do this, it also excites:
docker run \
-d \
-p 5200:3000 \
-v /docker/grafana/data:/var/lib/grafana \
grafana/grafana
But I wanted to do it like this:
docker run -d \
-p 5100:3000 \
-e "GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app" \
-v /docker/grafana/data:/var/lib/grafana \
grafana/grafana
Does anyone know why the container gets canceled when I try to install the plugin or redirect the output?