viper0131 / check_mk

Check_MK docker version
21 stars 20 forks source link

Volume problems on startup #34

Closed schmidtjohannes closed 6 years ago

schmidtjohannes commented 6 years ago

Hi, I am using the image with a mounted folder. The host-folder has 777 permissions but when I start the container it says

tail: cannot open '/var/log/nagios.log' for reading: No such file or directory tail: no files remaining

My command is docker run -d --restart always --name check_mk --cap-add=SYS_ADMIN -p 18080:5000 -e CMK_SITE=mysite -e CMK_PASSWORD=abcdefg -v /usr/share/check_mk/data:/opt/omd/sites/mysite nlmacamp/check_mk:1.5.0p3

Without the volume flag the installation works fine!

Working on CentOS 7, docker 1.18

Thanks in advance!

mcgege commented 6 years ago

Right, this doesn't work ... the instance is not initiated because it already sees the site directory. Try this mount:

-v /usr/share/check_mk/data:/opt/omd/sites

I'll correct this in the README

mcgege commented 6 years ago

Well, this was only for the first startup :-) For reusing this dir, the symbolic link to the log file must be recreated ... we'll fix this soon with #30

mcgege commented 6 years ago

Should work now ...

schmidtjohannes commented 6 years ago

Great! thanks a lot. Tested and happy ;)