The compose file references the image docker.internal:5000/monit:latest
that does not exist publicly because the image was built using the provided monit Dockerfile.
The /conf
mount within the guest should be mapped to a folder on the host and it will be read by monit on startup. Ideally, a small settings
file should be present with the following contents:
set daemon 120 # check services at 2-minute intervals set logfile /dev/stdout set httpd port 2812 use address 0.0.0.0 allow admin:swordfish include services/*
that:
2812
and the HTTP server listens on all addresses (necessary for Docker) with the username admin
and password swordfish
,services/
subfolder from the current directory where the user can place monit services to monitor.version: '3.8' services: monit: image: docker.internal:5000/monit:latest ports: - 10001:2812 volumes: - /mnt/docker/data/monit:/conf deploy: labels: - shepherd.enable=true - shepherd.auth.config=local replicas: 3 placement: max_replicas_per_node: 1 resources: limits: cpus: "0.50" memory: 200M