Docker/多指令:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第10行: 第10行:


{{Hc|entrypoint.sh|<pre>
{{Hc|entrypoint.sh|<pre>
nohup npm start &
#!/bin/bash
nohup node ./server/server.js &</pre>}}
 
nohup npm run beta &
nginx -g "daemon off;"
tail -f /dev/null</pre>}}

2021年5月8日 (六) 03:15的版本

标题文字

/home/kangkk
# 用nohup框起来,不然npm start执行了之后不会执行后面的
CMD nohup sh -c 'npm run beta && npm run prod'

或者

/home/kangkk
ENTRYPOINT ["sh", "/home/node/app/entrypoint.sh"]
entrypoint.sh
#!/bin/bash

nohup npm run beta &
nginx -g "daemon off;"
tail -f /dev/null