slack-bulkinviter icon indicating copy to clipboard operation
slack-bulkinviter copied to clipboard

Easily run this script with Docker

Open markshust opened this issue 4 years ago • 0 comments

Not an issue, but I thought it would be helpful to other people to easily run this.

Create a new directory named "slack-bulkinviter", then once in that directory, copied the raw file there:

mkdir slack-bulkinviter && cd $_
curl -O https://raw.githubusercontent.com/robby-dermody/slack-bulkinviter/master/slack-bulkinviter.py

You'll also want to create your apikey.txt file in this same directory with the contents of your API key.

I then created file named Dockerfile and pasted in the following contents:

FROM python:3.8.2-buster

RUN pip install --no-cache-dir slacker

COPY slack-bulkinviter.py .
COPY apikey.txt .

Then built the docker image with:

docker build -t slack-bulkinviter .

At this point you should be all set, and can run the script like so:

docker run -it --rm slack-bulkinviter python slack-bulkinviter.py your-channel

Hope this is helpful to someone who doesn't have python already installed on their system, or just wants a clean disposable way to run this script!

markshust avatar Mar 11 '20 15:03 markshust