A Slack integration to notify Docker events.
Setup an Incoming WebHook on your Slack workspace and get the WebHook URL.
# Docker
docker run -d \
-e webhook=https://hooks.slack.com/services/... \
-h "$(hostname)" \
-v /var/run/docker.sock:/var/run/docker.sock \
inverscom/slack-docker
# Docker Compose
curl -O https://raw.githubusercontent.com/int128/slack-docker/master/docker-compose.yml
docker-compose up -d
It supports the following options and environment variables:
Application Options [env-variable]:
--webhook [$webhook] = Slack Incoming WebHook URL
--image-regexp [$image_regexp] = Filter events by image name (default to all)
--container-name-regexp [$container_name_regexp] = Filter events by container name (default to all)
--action-regexp [$action_regexp] = Filter events by action (default to all) - possible values: https://docs.docker.com/engine/reference/commandline/events/
--type-regexp [$type_regexp] = Filter events by type (default to all) - possible values: https://docs.docker.com/engine/reference/commandline/events/
--title-link [$title_link] = Link for the title in slack (e.g. link to a protainer on this docker host)
Help Options:
-h, --help Show this help message
docker run -d \
-e webhook=https://hooks.slack.com/services/... \
-e image_regexp='^alpine$' \
-e type_regexp=container \
-e title_link=http://xxx \
-h "$(hostname)" \
-v /var/run/docker.sock:/var/run/docker.sock \
inverscom/slack-docker
docker run -d \
-e webhook=https://hooks.slack.com/services/... \
-e container_name_regexp=webserver \
-e type_regexp=container \
-e action_regexp=start|die \
-e title_link=http://xxx \
-h "$(hostname)" \
-v /var/run/docker.sock:/var/run/docker.sock \
inverscom/slack-docker
This is an open source software licensed under Apache-2.0. Feel free to open issues or pull requests.
Content type
Image
Digest
Size
9.7 MB
Last updated
about 6 years ago
docker pull inverscom/slack-docker