同様のことをしている資料だと動かないことが多々あったので記録しておきます。
Dockerfile
RUN npm install forever --save && npm install
CMD node_modules/forever/bin/forever -c coffee node_modules/.bin/hubot -a slack
forever -c
で任意のunixコマンドを呼び出すことが出来ます。
bin/hubot
はShellScriptでnode_modules/.bin/hubot
を呼び出しています。
node_modules/.bin/hubot
はCoffeeScriptです。
各ファイルの中身をちゃんと確認せずデーモン化しようとして嵌まりました。