首页 > 解决方案 > 从 docker 容器“失败”中启动 create-react-app / react-scripts 服务器,错误代码为 0

问题描述

我的屏幕输出是:

frontend    | 
frontend    | ℹ 「wds」: Project is running at http://192.168.16.2/
frontend    | ℹ 「wds」: webpack output is served from 
frontend    | ℹ 「wds」: Content not from webpack is served from /usr/src/app/public
frontend    | ℹ 「wds」: 404s will fallback to /
frontend    | Starting the development server...
frontend    | 
frontend exited with code 0

这就是我所得到的。当我将 Dockerfile 中的最后一行替换CMD ["npm", "start"]ENTRYPOINT ["tail", "-f", "/dev/null"], start, bash 并npm start手动执行时,一切都按预期工作。有什么方向吗?

标签: node.jsreactjsdockercreate-react-app

解决方案


推荐阅读