albertodonato / query-exporter

Export Prometheus metrics from SQL queries
GNU General Public License v3.0
436 stars 101 forks source link

No such file or directory: '/config.yaml' error on podman #186

Closed 1player closed 7 months ago

1player commented 7 months ago

I'm running query-exporter under podman (which is Docker-compatible), with the following incantation:

podman run --rm -it -v /srv/query-exporter/:/config adonato/query-exporter:latest

which fails with:

query-exporter: error: argument config: can't open '/config.yaml': [Errno 2] No such file or directory: '/config.yaml'

The README assumes the config is read by default from /config/config.yaml (and the Dockerfile also seems to suggest so), but on podman, it tries to load it from /config.yaml. Why is that?

albertodonato commented 7 months ago

This is due to the fix in #158, which hasn't be released yet (therefore the docker image still expects the config path to be passed as volume. I'm releasing 2.10.0 now with the fix, at which point your command should work

albertodonato commented 7 months ago

Released now