diff --git a/Dockerfile b/Dockerfile index cb8f2bd..e7a1f6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,15 @@ FROM alpine:3.8 -LABEL maintainer="Luis Miguel Vicente Fuentes " +LABEL maintainer="Luis Miguel Vicente Fuentes" # monit environment variables -ENV MONIT_VERSION=5.26.0 \ +ENV MONIT_VERSION=5.27.0 \ MONIT_HOME=/opt/monit \ MONIT_URL=https://mmonit.com/monit/dist \ PATH=$PATH:/opt/monit/bin -# Compile and install monit +# compile and install monit RUN \ - echo "*** compile and install monit ***" && \ apk add --update gcc musl-dev make libressl-dev file zlib-dev && \ mkdir -p /opt/src; cd /opt/src && \ wget -qO- ${MONIT_URL}/monit-${MONIT_VERSION}.tar.gz | tar xz && \ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..920ef68 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Luis Miguel Vicente Fuentes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7022025..f68f9ae 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/kijart/monit.svg)](https://hub.docker.com/r/kijart/monit) + # Monit - UNIX Systems Management Run Monit inside docker. @@ -6,27 +8,39 @@ Run Monit inside docker. [Monit](https://mmonit.com/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. -Default username/password: admin/monit +Default username/password: `admin/monit` + +## Versions + +| Docker image | Monit | +| ---------------------- | --------- | +| `kijart/monit:latest`  | `5.27.0`  | +| `kijart/monit:1.3.0`  | `5.27.0`  | +| `kijart/monit:1.2.0`  | `5.26.0`  | +| `kijart/monit:1.1.0`  | `5.25.2`  | +| `kijart/monit:1.0.2`  | `5.25.1`  | +| `kijart/monit:1.0.1`  | `5.25.1`  | +| `kijart/monit:1.0.0`  | `5.25.1`  | ## Docker setup -Install docker: https://docs.docker.com/engine/installation/ +Install docker: -Install docker compose: https://docs.docker.com/compose/install/ +Install docker compose: -Docker documentation: https://docs.docker.com/ +Docker documentation: ### 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` +- start monit: `docker run --rm -it -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc monit` ### Docker Hub image -- pull docker image from docker hub: `docker pull kijart/monit` +- pull docker image from docker hub: `docker pull kijart/monit:latest` -- start monit: `docker run -ti -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc kijart/monit` +- start monit: `docker run --rm -it -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc kijart/monit:latest` - create a docker container: @@ -35,7 +49,7 @@ docker create \ --name=monit \ -p 2812:2812 \ -v $(pwd)/monitrc:/etc/monitrc \ - kijart/monit + kijart/monit:latest ``` ### Docker compose diff --git a/docker-compose.yml b/docker-compose.yml index e11f133..f8b2b9c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,12 @@ -version: '3' +version: "2" services: monit: - image: "kijart/monit" + image: kijart/monit:latest + logging: + driver: json-file + options: + max-size: "10m" + max-file: "5" ports: - 2812:2812 volumes: