Try to run check_mk in a docker container

Using the given docker command from check_mk website “sudo docker container run -dit -p 8080:5000 --ulimit nofile=1024 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:1.6.0-latest”

conatainer is running, login website is shown, but can’t login, as the password is not provided in the logs
container log:

STARTING XINETD

[ ok ] Starting internet superserver: xinetd.

STARTING SITE

Starting mkeventd…OK
Starting rrdcached…OK
Starting npcd…OK
Starting nagios…OK
Starting apache…OK
Initializing Crontab…OK

STARTING CRON

CONTAINER STARTED

Thats it

you can change the password for cmkadmin:

~$su - monitoring
OMD[monitoring]:~$ htpasswd -m etc/htpasswd cmkadmin

I’m sorry, but this won’t work, because if the container is destroyed, the problem starts again
I’ve already tried to set the password with -e CMK_PASSWORD =‘mypassword’ this didn’t work either
And in addition I would have expected permanent mounts for the persistences
Can it be that the example is simply not complete ?

check this link:

https://docs.checkmk.com/latest/en/introduction_docker.html

root@linux# docker container logs monitoring
Created new site cmk with version 1.6.0.cre.

  The site can be started with omd start cmk.
  The default web UI is available at c395cfe2d50d/cmk/

  The admin user for the web applications is cmkadmin with password: erYJR0IT
  (It can be changed with 'htpasswd -m ~/etc/htpasswd cmkadmin' as site user.)
1 Like

I’ve fixed it by moving the docker base directory to anbother volume than root, Now its working. The reason was obviously a permission problem. Thanks for your help

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.