louislam / uptime-kuma-wiki

MIT License
50 stars 75 forks source link

Bridge Mode Info #48

Closed corincorvus closed 11 months ago

corincorvus commented 1 year ago

Hi,

i tried your Documentation for Monitoting Docker Containers and the daemon.json didnt work. I got your error with duplicate, but i couldnt solve it with your solution. https://github.com/louislam/uptime-kuma-wiki/blob/master/How-to-Monitor-Docker-Containers.md

So i tested other Solutions and the Solution, it worked on my Debian Bookworm, i want to share.

if i edit: sudo systemctl edit docker.service i get this information:

Editing /etc/systemd/system/docker.service.d/override.conf

Anything between here and the comment below will become the new contents of the file

So i created the docker.service.d folder and open the new file override.conf

In the override.conf i add:

[Service]
#The blank ExecStart is required to clear the current entry point
ExecStart=
#Replace the existing ExecStart but only remove the properties that you have added into the daemon.json file, leave all else the same.
#ExecStart=/usr/local/bin/dockerd --containerd=/run/containerd/containerd.sock
ExecStart=/usr/sbin/dockerd -H tcp://0.0.0.0:2375 -H fd:// --containerd=/run/containerd/containerd.sock $DOCKER_OPTS

for testing.

After i add certificate:

[Service]
#The blank ExecStart is required to clear the current entry point
ExecStart=
#Replace the existing ExecStart but only remove the properties that you have added into the daemon.json file, leave all else the same.
#ExecStart=/usr/local/bin/dockerd --containerd=/run/containerd/containerd.sock
ExecStart=/usr/sbin/dockerd --tlsverify --tlscacert=/etc/docker/ca.pem --tlscert=/etc/docker/server-cert.pem --tlskey=/etc/docker/server-key.pem -H tcp://0.0.0.0:2375 -H fd:// --containerd=/run/containerd/containerd.sock $DOCKER_OPTS

it work fine: image image

I hope someone will help this.

Thanks