Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does container expect config.yml to be mounted to #1

Open
mehstg opened this issue Aug 8, 2018 · 3 comments
Open

Where does container expect config.yml to be mounted to #1

mehstg opened this issue Aug 8, 2018 · 3 comments

Comments

@mehstg
Copy link

mehstg commented Aug 8, 2018

Hi Jesse

Where does your container expect the config.yml file to be mounted. I have tried a few obvious locations but get the failed to read config file "": open : no such file or directory error.

Have manually jumped on to the container and run ./unifi_exporter -config.file config.yml from the working directory and everything works fine, so would assume it is just an issue with my mount location.

@Kroev
Copy link

Kroev commented Sep 11, 2018

Hello,

The Dockerfile specifies /bin/unifi_exporter as entrypoint without any arguments, so you need to specify the path to your config file yourself with -config.file=<path to config>. That is why the error message says failed to read config file "":
note that there is no path given in the error message.

See docker entrypoint docu to find out how to append an argument to the entrypoint.

The kubernetes manifest however defines an argument and thus the container in k8s expects the config file under /unifi_exporter/config.yml.

hope it helps

@havra
Copy link

havra commented Nov 9, 2020

Here's a sample docker command:
docker run -d --name Unifi_Exporter --restart=always --publish 9130:9130 -v ./config.yml:/etc/config.yml jessestuart/unifi_exporter -config.file /etc/config.yml

@martydingo
Copy link

I think this should be added to the repositories README.md

It's a bit annoying to crawl through issues to find the exact argument to parse the config into the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants