├── scripts └── .gitignore ├── ENV ├── hubot-start.sh ├── external-scripts.json ├── README.md ├── package.json ├── Dockerfile └── LICENSE /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ENV: -------------------------------------------------------------------------------- 1 | # SLACK adapter options 2 | HUBOT_ADAPTER=slack 3 | HUBOT_OWNER=hubot 4 | HUBOT_NAME=hubot 5 | HUBOT_DESCRIPTION=Just a friendly robot 6 | HUBOT_SLACK_TOKEN= 7 | 8 | # IRC adapter options 9 | 10 | # CAMPFIRE adapter options 11 | -------------------------------------------------------------------------------- /hubot-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # script used to detect if hubot has already been generated 4 | 5 | if [[ -x /home/hubot/bot/bin/hubot ]]; then 6 | bin/hubot 7 | else 8 | /usr/local/bin/yo hubot --adapter ${HUBOT_ADAPTER} --owner ${HUBOT_OWNER} --name ${HUBOT_NAME} --description ${HUBOT_DESCRIPTION} --defaults --no-insight 9 | fi 10 | -------------------------------------------------------------------------------- /external-scripts.json: -------------------------------------------------------------------------------- 1 | [ 2 | "hubot-diagnostics", 3 | "hubot-help", 4 | "hubot-heroku-keepalive", 5 | "hubot-google-images", 6 | "hubot-google-translate", 7 | "hubot-pugme", 8 | "hubot-maps", 9 | "hubot-redis-brain", 10 | "hubot-rules", 11 | "hubot-shipit", 12 | "hubot-youtube", 13 | "hubot-fliptable", 14 | "hubot-tell" 15 | ] 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## This is an example repo that has been archived. It is not actively maintained. Feel free to fork it but I have no plans to keep it updated. 2 | 3 | # docker-hubot 4 | Container for running hubot. 5 | 6 | ### Clone Repository 7 | 8 | ``` 9 | git clone https://github.com/rothgar/docker-hubot.git 10 | ``` 11 | 12 | ### Build Container 13 | 14 | ``` 15 | docker build --tag=hubot . 16 | ``` 17 | 18 | ### Run Container 19 | 20 | ``` 21 | docker run --env-file ./ENV -v /etc/localtime:/etc/localtime:ro --name hubot hubot 22 | ``` 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bot", 3 | "version": "0.0.0", 4 | "private": true, 5 | "author": "Bot Makers", 6 | "description": "slack hubot", 7 | "dependencies": { 8 | "hubot": "^2.11.0", 9 | "hubot-diagnostics": "0.0.1", 10 | "hubot-google-images": "^0.1.2", 11 | "hubot-google-translate": "^0.1.0", 12 | "hubot-help": "^0.1.1", 13 | "hubot-maps": "0.0.1", 14 | "hubot-pugme": "^0.1.0", 15 | "hubot-redis-brain": "0.0.2", 16 | "hubot-rules": "^0.1.0", 17 | "hubot-scripts": "^2.5.16", 18 | "hubot-shipit": "^0.1.1", 19 | "hubot-slack": "^3.2.1", 20 | "hubot-youtube": "^0.1.2", 21 | "hubot-fliptable": ">=0.0.0", 22 | "hubot-tell": "*" 23 | }, 24 | "engines": { 25 | "node": "0.10.x" 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:4.4.3-slim 2 | MAINTAINER Justin Garrison 3 | 4 | # Install CoffeeScript, Hubot 5 | RUN \ 6 | npm install -g coffee-script hubot yo generator-hubot && \ 7 | rm -rf /var/lib/apt/lists/* 8 | 9 | # make user for bot 10 | # yo requires uid/gid 501 11 | RUN groupadd -g 501 hubot && \ 12 | useradd -m -u 501 -g 501 hubot 13 | 14 | COPY ["external-scripts.json","hubot-start.sh","package.json","scripts/", "/home/hubot/bot/"] 15 | 16 | # make directories and files 17 | RUN mkdir -p /home/hubot/.config/configstore && \ 18 | echo "optOut: true" > /home/hubot/.config/configstore/insight-yo.yml && \ 19 | chown -R hubot:hubot /home/hubot && \ 20 | chmod +x /home/hubot/bot/hubot-start.sh 21 | 22 | USER hubot 23 | WORKDIR /home/hubot/bot 24 | 25 | # optionally override variables with docker run -e HUBOT_... 26 | # Modify ./ENV file to override these options 27 | ENV HUBOT_OWNER hubot 28 | ENV HUBOT_NAME hubot 29 | ENV HUBOT_ADAPTER slack 30 | ENV HUBOT_DESCRIPTION Just a friendly robot 31 | 32 | # Override adapter with --env-file ENV 33 | ENTRYPOINT ./hubot-start.sh 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Justin Garrison 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | --------------------------------------------------------------------------------