I don't think the error message could be any clearer.  You told it to read 
the file /prometheus.yml, but /prometheus.yml is a directory, not a file.

The most likely reason is here:
https://stackoverflow.com/a/44950494/14241561

Namely, the file didn't exist on the host at the time you mounted it with 
-v, so it got created as a directory instead.

Note that volume-mounting a single file like this is unwise anyway, in the 
case that you might want to change this file while the container is running:
https://forums.docker.com/t/sharing-a-single-file-via-a-volume-mount-does-not-work-as-expected/57088
It's better to mount the enclosing directory.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/f5abfe29-feed-4814-a33c-301cc29e9755o%40googlegroups.com.

Reply via email to