version: "3.8" services: grafana: image: grafana/grafana:latest container_name: grafana_docker restart: unless-stopped # if you are running as root then set it to 0 # else find the right id with the id -u command user: '0' ports: - '3000:3000' # mounting volume point which we create earlier volumes: - '~/grafana-docker/grafana_data:/var/lib/grafana'