Giter Club home page Giter Club logo

monitcentos's Introduction

monitCentos

This is the project for starting monit as process manager for centos docker container.

The shell script is used to start the monit. Monit itself is not run as PID 1. This helps in the maintenance of monit without restarting the container itself.

You can use it as a base for your own Docker images. Two services (fooservice and barservice) are started to demonstrate the use of monit for porcess control. fooservice is made to depend on barservice. Kill of barservice leads to kill of fooservice as well. Both the services are started with "foo" user.

What's inside the image?

The centos:7 image is used; monit is installed using yum.

Starting from base centos image of 200 MB, the final image size is found to be approx.

254 MB (without yum update of base centos image)

(as of Tue Oct 2,2018)

How to build Docker Image?

Clone the repository and change to the directory where Dockerfile exists; execute the docker build command.

Sample example of docker build command is:

    docker build --network=host -t centos_monit_github:github .

Debugging!!

  • yum install failures

    If you are behind proxy, then yum update and installation may fail for your docker build; please set up environment variable for yum and curl to use the proxy.

    Example of editing yum.conf for proxy :

    Suppose the proxy is 10.144.1.10:8080 then , one can execute

      printf "\nproxy=http://10.144.1.10:8080" >> /etc/yum.conf
    

    in the beginning of prepare.sh script. This will enable all the subsequent yum commands to use the given proxy for their operations.

    Do not forget to remove this entry from the yum.conf at the end of image build as a part of cleanup.

  • curl failure

    If curl commands are failing for the same reason then http_proxy needs to be set for the same. One can execute, for example , following snippet

      export http_proxy=http://10.144.1.10:8080
      export ftp_proxy=http://10.144.1.10:8080
      export https_proxy=https://10.144.1.10:8080
    

    to set the environment.

Any Suggestions are welcome!!!

monitcentos's People

Contributors

wheeskyjack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.