A slack-bot that sends docker events to a slack channel
1.1K
Receive Slack notifications when a container dies
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 container's information to the selected Slack channel.
docker build \
-t docker-events-notifier:$VERSION \
-t docker-events-notifier .
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" \
oguya/docker-event-notifier
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 \
oguya/docker-events-notifier
Apache License Version 2.0
Content type
Image
Digest
Size
26.6 MB
Last updated
over 9 years ago
docker pull oguya/docker-event-notifier