方法一:直接使用 ENTRYPOINT
如何在docker里面同時(shí)啟動(dòng)多個(gè)pm2進(jìn)程_祥仔先生的博客-CSDN博客_docker pm2
ENTRYPOINT 命令1 & 命令2 & 命令3
方法二:ENTRYPOINT 執(zhí)行sh文件
dockerfile中添加:
RUN chmod -x setup.sh文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-518263.html
ENTRYPOINT ["sh", "./setup.sh"]文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-518263.html
#!/bin/bash
cp ./reuqest-center_rsyslog.conf /etc/rsyslog.d/reuqest-center_rsyslog.conf
cp ./rsyslog.conf /etc/rsyslog.conf
/sbin/rsyslogd &> /dev/null & pm2-runtime ./build/bin/worker.js -i 30 --name woker
到了這里,關(guān)于docker ENTRYPOINT 執(zhí)行多條命令的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!