I am trying to spin up a grafana container in docker, however my setup in docker does not allow ipv4 forwarding and thus I cannot use the default bridge network
in docker. All I can use is the host network
, and port 3000
is already in use on my server , so I am trying to run a grafana container and set some sort of environment variable at the run time in order to change the port and be able to run the container.
What I tried is this :
docker run --network host --rm -e "GF_SERVER_HTTP_PORT:5000" my_image_id
I m referencing my -e
option to https://grafana.com/docs/grafana/latest/setup-grafana/configure-docker/#configure-grafana-with-docker-secrets and this https://grafana.com/docs/grafana/latest/setup-grafana/configure-docker/#default-paths . But I think something is going wrong since the port does not change.