GithubHelp home page GithubHelp logo

00mjk / docker-events-notifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from socialmetrix/docker-events-notifier

0.0 0.0 0.0 11 KB

Receive a Slack notifications when a container dies

Home Page: https://hub.docker.com/r/socialmetrix/docker-events-notifier/

License: Apache License 2.0

Shell 12.39% Python 87.61%

docker-events-notifier's Introduction

Docker Events Notifier

Receive Slack notifications when a container dies

How it works

This image connects to the host machine socket, through a volume mapping, and listen Docker Events API.

When a die event is triggered it sends the affected containers' information to the selected Slack channel.

Build

You must create a release tag in order to build and publish this image.

./build-all.sh

Run

  1. Because this app is just for you, you'll be fine with a Slack Tokens for Testing and Development

Single docker engine

Run the container on a single docker engine, using slack api key and channel.

docker run \
    -d --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e SLACK_API_KEY="xoxp-9999999999-9999999999-9999999999-99999999999999999999999" \
    -e SLACK_CHANNEL="#foo" \
    socialmetrix/docker-events-notifier:${VERSION}

Docker swarm mode

Run the container on every node of your swarm.

docker service create \
    --mode global \
    --restart-condition any \
    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
    -e SLACK_API_KEY="xoxp-9999999999-99999999999-999999999999-99999999999999999999999999999999" \
    -e SLACK_CHANNEL="#foo" \
    --name docker-events-notifier \
    socialmetrix/docker-events-notifier:${VERSION}

License

Apache License Version 2.0

docker-events-notifier's People

Contributors

pabloromanelli 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.