Skip to content

arefaslani/docker-telegram-notifier

Repository files navigation

docker-telegram-notifier

A Telegram integration to notify Docker events inspired by slack-notifier.

How to Run

Set up a telegram bot and get the Bot Token. then add the bot to a group and make it admin and extract the Chat ID.

Run a container as follows:

# Docker
docker run -d -e TELEGRAM_NOTIFIER_BOT_TOKEN=token -e TELEGRAM_NOTIFIER_CHAT_ID=chat_id -v /var/run/docker.sock:/var/run/docker.sock arefaslani/docker-telegram-notifier

# Docker Compose
curl -O https://raw.githubusercontent.com/arefaslani/docker-telegram-notifier/master/docker-compose.yml
docker-compose up -d

Filter events by image name

By default all events are sent to Slack, but events can be filtered by the environment variable image_regexp as follows:

# show events only from node
-e image_regexp='^node:'

# show events but exclude from node
-e image_regexp='^(?!node:)'

Contribution

Please let me know an issue or pull request.

About

Telegram notifier for Docker events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages