Skip to content

Instantly share code, notes, and snippets.

@nemupm
Created August 15, 2016 15:12
Show Gist options
  • Save nemupm/853c90f5497bebde77a0a30137d0d815 to your computer and use it in GitHub Desktop.
Save nemupm/853c90f5497bebde77a0a30137d0d815 to your computer and use it in GitHub Desktop.
Docomoの雑談対話APIを使ってHubotとSlack上で雑談するためのDockerfile
FROM node:latest
MAINTAINER nemupm
RUN npm install -g hubot coffee-script
RUN npm install -g yo generator-hubot
RUN useradd hubot
WORKDIR /home/hubot/myslackbot
RUN chmod -R 777 /home/hubot
USER hubot
RUN yes | yo hubot --defaults
RUN git clone --recursive https://github.com/nemupm/hubot-docomo-dialog.git
RUN npm install hubot-slack --save
RUN npm install hubot-docomo-dialog --save
RUN sed -i -e "2i \"hubot-docomo-dialog\"," external-scripts.json
ENV HUBOT_SLACK_TOKEN xxxx-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx
ENV HUBOT_SLACK_TEAM xxxxx
ENV HUBOT_SLACK_BOTNAME xxxxx
ENV HUBOT_SLACK_CHANNELS xxxxx
ENV HUBOT_SLACK_CHANNELMODE blacklist
ENV DOCOMO_API_KEY xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CMD cd /home/hubot/myslackbot; bin/hubot --adapter slack
@nemupm
Copy link
Author

nemupm commented Aug 15, 2016

$ vim Dockerfile
$ docker build -t hubot/docomo-talk:v0.1 .
$ docker run -t -i hubot/docomo-talk:v0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment