Add docker check example
continuous-integration/drone/push Build is failing Details

This commit is contained in:
IamTheFij 2019-05-31 16:38:00 -07:00
parent 6d93aed7f1
commit 0ea55fa7b3
4 changed files with 34 additions and 0 deletions

7
examples/Readme.md Normal file
View File

@ -0,0 +1,7 @@
# Minitor Examples
A few examples of advanced Minitor configuration using Docker Compose.
These are all built against the local version and not Docker Hub. Before you try anything here, run `make docker-build` from the root `minitor` directory so that the `minitor-dev` image is built on your local host.
If you are trying to deploy these configs and you would like to use the public image instead, change `minitor-dev` to `iamthefij/minitor`.

View File

@ -0,0 +1,3 @@
FROM minitor-dev
RUN apt-get update && apt-get install -y jq curl && apt-get clean

View File

@ -0,0 +1,7 @@
# Docker Checks
A sample docker-compose example that uses the bundled shell scripts to monitor the health of other Docker containers.
## Security note
Exposing `/var/run/docker.sock` comes at a risk. Please be careful when doing this. If someone is able to take over your Minitor container, they will then essentially have root access to your whole host. To minimize risk, be wary of exposing Minitor to the public internet when using a configuration like this.

View File

@ -0,0 +1,17 @@
version: '2'
services:
minitor:
build: .
volumes:
- ./config.yml:/app/config.yml
- /var/run/docker.sock:/var/run/docker.sock:ro
failure:
container_name: failure
image: busybox
command: "sh -c 'exit 1'"
success:
container_name: success
image: busybox
command: "sh -c 'exit 0'"