thumbor: Update to post v6.0
[dockerfile.git] / hubot / Dockerfile.template
1 # Copyright (C) 2014 W. Trevor King <wking@tremily.us>
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are met:
5 #
6 # * Redistributions of source code must retain the above copyright notice, this
7 # list of conditions and the following disclaimer.
8 #
9 # * Redistributions in binary form must reproduce the above copyright notice,
10 # this list of conditions and the following disclaimer in the documentation
11 # and/or other materials provided with the distribution.
12 #
13 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 # POSSIBILITY OF SUCH DAMAGE.
24
25 FROM ${NAMESPACE}/gentoo-node:${TAG}
26 MAINTAINER ${MAINTAINER}
27 #VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"]
28 RUN emerge -v dev-vcs/git
29 RUN eselect news read new
30 RUN npm install -g hubot coffee-script
31 RUN hubot --create hubot
32 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "redis": "0.8.4",/' hubot/package.json
33 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "hubot-irc": "0.2.1",/' hubot/package.json
34
35 RUN sed -i 's/\]$/,\n "github-commit-link.coffee"]/' hubot/hubot-scripts.json
36 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\1  "githubot": "0.4.x",/' hubot/package.json
37
38 RUN sed -i 's/\]$/,\n "github-commits.coffee"]/' hubot/hubot-scripts.json
39 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "url": "",/' hubot/package.json
40 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "querystring": "",/' hubot/package.json
41 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "gitio2": "2.0.0",/' hubot/package.json
42
43 RUN sed -i 's/\]$/,\n "github-issue-link.coffee"]/' hubot/hubot-scripts.json
44 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "githubot": "0.4.x",/' hubot/package.json
45
46 RUN sed -i 's/\]$/,\n "github-issues.coffee"]/' hubot/hubot-scripts.json
47 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "underscore": "1.3.3",/' hubot/package.json
48 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "underscore.string": "2.1.1",/' hubot/package.json
49 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "githubot": "0.4.x",/' hubot/package.json
50
51 RUN sed -i 's/\]$/,\n "github-pull-request-notifier.coffee"]/' hubot/hubot-scripts.json
52 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "url": "",/' hubot/package.json
53 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "querystring": "",/' hubot/package.json
54
55 RUN sed -i 's/\]$/,\n "logger.coffee"]/' hubot/hubot-scripts.json
56 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "redis": ">=0.7.2",/' hubot/package.json
57 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "moment": ">=1.7.0",/' hubot/package.json
58 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "connect": ">=2.4.5",/' hubot/package.json
59 RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "connect_router": "*",/' hubot/package.json
60
61 RUN cd hubot && npm install
62 RUN git clone git://github.com/jenrzzz/hubot-logger.git && cp hubot-logger/logger.coffee hubot/node_modules/hubot-scripts/src/scripts/
63
64 CMD cd hubot && REDIS_URL="${REDIS_PORT}" LOG_REDIS_URL="${REDIS_PORT}" PORT=80 exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc
65 EXPOSE 80
66 EXPOSE 8000