Run Monit inside docker.
Go to file
Luis Miguel Vicente Fuentes 0263898978 Merge branch 'release/1.0.1'
2018-02-28 20:10:58 +01:00
Dockerfile Add Dockerfile to build an image with Alpine linux + monit 2018-02-28 19:24:43 +01:00
monitrc Add Monit control file 2018-02-28 19:26:12 +01:00
README.md Add Docker Hub image documentation 2018-02-28 20:10:16 +01:00

Monit - UNIX Systems Management

Run Monit inside docker.

Monit

Monit is a free open source utility for managing and monitoring, processes, programs, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

Docker setup

Install docker: https://docs.docker.com/engine/installation/

Docker documentation: https://docs.docker.com/

Build-in docker image

  • build docker image docker build -t monit .

  • start monit: docker run -ti -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc monit

Docker Hub image

  • pull docker image from docker hub: docker pull kijart/monit

  • download a video using docker image: docker run -ti -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc kijart/monit

  • create a docker container:

docker create \
  --name=monit \
  -p 2812:2812 \
  -v $(pwd)/monitrc:/etc/monitrc \
  kijart/monit

Troubleshooting

If when starting Monit returns the following message: The control file '/etc/monitrc' permission 0755 is wrong, maximum 0700 allowed, simply give the appropriate permissions to monitrc: chmod 700 monitrc.