slackbot-workout icon indicating copy to clipboard operation
slackbot-workout copied to clipboard

Include a Dockerfile

Open bobbytables opened this issue 9 years ago • 3 comments

It would be awesome to be able to pull this down as a docker image and just run it like that. Any possibility of that happening?

bobbytables avatar Oct 05 '15 00:10 bobbytables

fwiw i just tried to do this, unfortunately this project doesn't lend itself to super straightforward containerization, it reads and writes a couple different kinds of files to local disk in the current working directory, so some directory mapping would be needed, and maybe the ability to specify where to write files. it can be done, but I was not able to get it going satisfactorily in the minutes I had available.. here's a dockerfile that successfully starts the app tho..

FROM    ubuntu:15.04
RUN     apt-get -y update
RUN     apt-get install -y python-pip
RUN     pip install requests==2.7.0

ADD     . /srv/app/

ENV     SLACK_USER_TOKEN_STRING "your-user-token"
ENV     SLACK_URL_TOKEN_STRING "your-slackbot-token"

WORKDIR /srv/app
CMD     ["/usr/bin/python", "/srv/app/slackbotExercise.py"]

override those two env vars when you run the image

keeth avatar Oct 05 '15 18:10 keeth

I have a fork that ive made some changes that allow containerizing better.

bobbytables avatar Oct 05 '15 18:10 bobbytables

I've opened a PR for this #28

bobbytables avatar Oct 08 '15 21:10 bobbytables