Skip to content

derekoharrow/docker-events-pushover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Events Pushover

Receive Pushover notifications when on docker container events

How it works

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

When specified events are triggered it sends the affected containers' information to PushBullet.

If no events are specified in the enironment variables, these are the default ones: "create","update","destroy","die","kill","pause","unpause","start","stop"

If the label docker-events.ignore is specified, then that container will not be checked.

Build

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

./build-all.sh

Run

First, get a Pushover account (https://https://pushover.net/) Then, make a note of your User Key Then, create a new Application within Pushover, and make a note of the Token

Run (default events)

docker run \
    -d --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e PUSHOVER_TOKEN="INSERT-TOKEN-HERE" \
    -e PUSHOVER_KEY="INSERT-KEY-HERE" \
    derekoharrow/docker-events-pushover:latest

Run (custom events)

docker run \
    -d --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e PUSHOVER_TOKEN="INSERT-TOKEN-HERE" \
    -e PUSHOVER_KEY="INSERT-KEY-HERE" \
    -e EVENTS="die,destroy,kill"
    derekoharrow/docker-events-pushover:latest

Run (Docker Compose/Stack)

version: '2'
 
services:
  docker-events:
    container_name: docker-events
    image: derekoharrow/docker-events-pushover:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - PUSHOVER_TOKEN=INSERT-TOKEN-HERE
      - PUSHOVER_KEY=INSERT-KEY-HERE
      - EVENTS=die,destroy,kill
    restart: unless-stopped

License

Apache License Version 2.0

About

Receive a PushOver notification on Docker events

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 81.9%
  • Shell 11.3%
  • Dockerfile 6.8%