https://grafana.com/docs/grafana/latest/installation/docker/
influxdbと連携させたいので、influxdb も一緒にインストール。
docker-compose.yml
version: "3" services: influxdb: image: influxdb:latest ports: - "8086:8086" volumes: - ./influxdb/data:/var/lib/influxdb grafana: image: grafana/grafana:latest ports: - "3000:3000" volumes: - ./grafana/dashboards:/etc/grafana/provisioning/dashboards - ./grafana/datasources:/etc/grafana/provisioning/datasources depends_on: - influxdb environment: - GF_SERVER_ROOT_URL=http://localhost:3000 - GF_SECURITY_ADMIN_PASSWORD=admin