forked from RocketChat/hubot-rocketchat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest Node 10 and fix issue RocketChat#318 - inspired by R…
- Loading branch information
Thomas Lutz
committed
Jan 26, 2020
1 parent
fdb324f
commit 969eed7
Showing
2 changed files
with
341 additions
and
922 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
FROM node:4.8.3 | ||
MAINTAINER Rocket.Chat Team <[email protected]> | ||
FROM node:10.18.1 | ||
LABEL Rocket.Chat Team <[email protected]> | ||
|
||
RUN npm install -g coffee-script yo generator-hubot && \ | ||
RUN npm install -g coffeescript yo generator-hubot && \ | ||
useradd hubot -m | ||
|
||
USER hubot | ||
|
||
WORKDIR /home/hubot | ||
|
@@ -19,18 +18,17 @@ RUN yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" - | |
sed -i /redis-brain/d ./external-scripts.json && \ | ||
npm install hubot-scripts | ||
|
||
ADD . /home/hubot/node_modules/hubot-rocketchat | ||
ADD . /home/hubot/hubot-rocketchat | ||
|
||
# hack added to get around owner issue: https://github.com/docker/docker/issues/6119 | ||
USER root | ||
RUN chown hubot:hubot -R /home/hubot/node_modules/hubot-rocketchat | ||
RUN chown hubot:hubot -R /home/hubot/hubot-rocketchat | ||
USER hubot | ||
|
||
RUN cd /home/hubot/node_modules/hubot-rocketchat && \ | ||
npm install && \ | ||
#coffee -c /home/hubot/node_modules/hubot-rocketchat/src/*.coffee && \ | ||
cd /home/hubot | ||
RUN npm install ./hubot-rocketchat \ | ||
#coffee -c /home/hubot/node_modules/hubot-rocketchat/src/*.coffee && | ||
&& cd /home/hubot | ||
|
||
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 rocketchat | ||
bin/hubot -n $BOT_NAME -a rocketchat |
Oops, something went wrong.