FROM node:latest
MAINTAINER XXXX <xxxxx@xxx.com>
# package update
RUN apt-get update && \
apt-get -y install -y git-core redis-server vim
RUN adduser --disabled-password --gecos "" hubot && \
chown -R hubot:hubot /home/hubot && \
echo "hubot ALL=(ALL) ALL" >> /etc/sudoers && \
mkdir /root/packages && \
cd /root/packages && \
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \
chmod +x jq-linux64 && \
cp -p jq-linux64 /usr/bin/jq
RUN npm install -g coffeelint
RUN npm install -g yo generator-hubot
RUN npm install hubot-slack hubot-proxy-loader --save
USER hubot
WORKDIR /home/hubot
RUN mkdir test && \
mkdir test/tools && \
cd test && \
yo hubot --owner hoge --name testbot --description "hubot for hoge" --adapter slack && \
jq ' .-["hubot-heroku-keepalive","hubot-pugme","hubot-shipit"]' external-scripts.json > new-external-scripts.json && \
jq ".[$(jq -s '.[] | length' new-external-scripts.json)]|= .+\"hubot-proxy-loader\"" new-external-scripts.json > new2-external-scripts.json && \
mv new2-external-scripts.json external-scripts.json && rm -f new-external-scripts.json && rm -f hubot-scripts.json
COPY tools/ test/tools
COPY scripts/ test/scripts
ENV HUBOT_SLACK_TOKEN xxxx-123123-234434ssssss
ENV HUBOT_SLACK_CHANNELMODE whitelist
ENV HUBOT_SLACK_CHANNELS temporalchatroom
WORKDIR /home/hubot/test
CMD bin/hubot --adapter slack
LABEL version="0.0.1"