Sign inSign up

okwrtdsh/slackbot

By okwrtdsh

•Updated almost 8 years ago

Docker Image for Slack bot

Image
1

1.6K

okwrtdsh/slackbot repository overview

⁠slackbot ⁠

⁠Usage

⁠Generate the slack api token

First you need to get the slack api token for your bot. You have two options:

  1. If you use a bot user integration⁠ of slack, you can get the api token on the integration page.
  2. If you use a real slack user, you can generate an api token on slack web api page⁠.
⁠Configure the api token

You need to configure the API_TOKEN in environment variable.

docker-compose.yml

version: '3'
services:
  slackbot:
    image: okwrtdsh/slackbot:latest
    environment:
      - API_TOKEN="YOUR_API_TOKEN"
⁠Run the bot
docker-compose up -d
⁠Create Plugins

See the slackbot's README⁠.

You just place your scripts in /app/plugins.

docker-compose.yml

version: '3'
services:
  slackbot:
    image: okwrtdsh/slackbot:latest
    volumes:
      - ./example/hello.py:/app/plugins/hello.py
    environment:
      - API_TOKEN="YOUR_API_TOKEN"

If you need other libraries, you can use your requirements.txt.

docker-compose.yml

version: '3'
services:
  slackbot:
    image: okwrtdsh/slackbot:latest
    volumes:
      - ./example/hello.py:/app/plugins/hello.py
      - ./requirements.txt:/requirements.txt
    environment:
      - API_TOKEN="YOUR_API_TOKEN"

Tag summary

Content type

Image

Digest

Size

340.1 MB

Last updated

almost 8 years ago

docker pull okwrtdsh/slackbot