docker: Error response from daemon: driver failed programming external connectivity on endpoint monitoring (beaef525e6f5c85937970641a5465676a260dc2550c76f8bb0b28d34ccf5355a): Bind for 0.0.0.0:8080 failed: port is already allocated.
docker logs monitoring
### CREATING SITE 'cmk'
Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
Going to set TMPFS to off.
Temporary filesystem already mounted
Updating core configuration...
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Executing post-create script "01_create-sample-config.py"...OK
Created new site cmk with version 2.1.0p24.cre.
The site can be started with omd start cmk.
The default web UI is available at http://cf125b78ecb4/cmk/
The admin user for the web applications is cmkadmin with password: ZmYU4f7U
For command line administration of the site, log in with 'omd su cmk'.
After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache.
### STARTING XINETD
* Starting internet superserver xinetd [ OK ]
### STARTING SITE
Temporary filesystem already mounted
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Starting redis...OK
Initializing Crontab...OK
### STARTING CRON
### CONTAINER STARTED
Used Docker version was
Server: Docker Engine - Community
Engine:
Version: 23.0.1
One other point, is there a special reason to start the docker as root?
All my containers are started with normal user accounts.
It looks like there are old containers of the Checkmk image running, and the volume is not empty.
Try to find old containers with docker ps -a, stop them if needed with docker stop, and remove them with docker rm.
Then, search for the volume with docker volume ls. If there is a line like "local monitoring, remove it with docker image rm monitoring`. After that, the unmodified start command from the Checkmk documentation should work. Do not omit the “uid=1000,gid=1000” options in the tmpfs directive.
If this does not work, install a fresh Debian 11 VM and try again.