Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/int128/slack-docker
Slack/Mattermost Integration for notifying Docker events, written in Go
https://github.com/int128/slack-docker
docker docker-events golang slack slack-incoming-webhooks
Last synced: 3 days ago
JSON representation
Slack/Mattermost Integration for notifying Docker events, written in Go
- Host: GitHub
- URL: https://github.com/int128/slack-docker
- Owner: int128
- License: apache-2.0
- Created: 2014-10-04T08:06:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-01-04T01:01:21.000Z (19 days ago)
- Last Synced: 2025-01-12T03:48:45.166Z (11 days ago)
- Topics: docker, docker-events, golang, slack, slack-incoming-webhooks
- Language: Go
- Homepage:
- Size: 188 KB
- Stars: 113
- Watchers: 8
- Forks: 30
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slack-docker [![go](https://github.com/int128/slack-docker/actions/workflows/go.yaml/badge.svg)](https://github.com/int128/slack-docker/actions/workflows/go.yaml)
A Slack integration to notify [Docker events](https://docs.docker.com/engine/reference/commandline/events/).
## Getting Started
Setup [an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) on your Slack workspace and get the WebHook URL.
Install slack-docker by brew tap or from the [releases](https://github.com/int128/slack-docker/releases).
```sh
brew tap int128/slack-docker
brew install slack-docker
```Run the command with the WebHook URL.
```sh
slack-docker --webhook=https://hooks.slack.com/services/...
```You can run the Docker image [`ghcr.io/int128/slack-docker`](https://ghcr.io/int128/slack-docker).
```sh
# Docker
docker run -d -e webhook=https://hooks.slack.com/services/... -h "$(hostname)" -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/int128/slack-docker# Docker Compose
curl -O https://raw.githubusercontent.com/int128/slack-docker/master/docker-compose.yml
docker-compose up -d
```## Configuration
It supports the following options and environment variables:
```
Application Options:
--webhook= Slack Incoming WebHook URL [$webhook]
--image-regexp= Filter events by image name (default to all) [$image_regexp]Help Options:
-h, --help Show this help message
```### Filter events by image name
```sh
webhook=https://hooks.slack.com/services/... image_regexp='^alpine$' ./slack-docker
```## Contribution
This is an open source software licensed under Apache-2.0.
Feel free to open issues or pull requests.