The docker-compose.yaml doesn't work for me, I get this error
docker-compose -f dc.yaml up -d
ERROR: The Compose file './dc.yaml' is invalid because:
'grafana' does not match any of the regexes: '^x-'
You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
I later modified the compose file as below, to get it working
version: '3'
services:
grafana:
image: grafana/grafana:7.5.7
ports:
- 3000:3000
restart: unless-stopped
volumes:
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- grafana-data:/var/lib/grafana
volumes:
grafana-data: