-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
25 lines (18 loc) · 902 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:8-slim
MAINTAINER Ensky Lin <enskylin@gmail.com>
RUN npm install -g yo generator-hubot && \
useradd hubot -m
USER hubot
WORKDIR /home/hubot
ENV BOT_NAME "synohubot"
ENV BOT_OWNER "No owner specified"
ENV BOT_DESC "Hubot with synology chat adapter"
ENV EXTERNAL_SCRIPTS=hubot-diagnostics,hubot-help,hubot-google-images,hubot-google-translate,hubot-pugme,hubot-maps,hubot-rules,hubot-shipit
RUN yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" --defaults && \
sed -i /heroku/d ./external-scripts.json && \
sed -i /redis-brain/d ./external-scripts.json && \
npm install hubot-scripts && \
npm install --save hubot-synologychat
CMD node -e "console.log(JSON.stringify('$EXTERNAL_SCRIPTS'.split(',')))" > external-scripts.json && \
npm install $(node -e "console.log('$EXTERNAL_SCRIPTS'.split(',').join(' '))") && \
bin/hubot -n $BOT_NAME -a synologychat