React app exiting in docker container with exit code 0

后端 未结 4 2106
无人共我
无人共我 2020-11-27 07:48

I am trying to create a docker-compose setup with nginzx, flask, and react. I started my react app with react-create-app (https://github.com/facebook/create-react-app) and h

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 08:19

    As the issue is with react-scripts version > 3.4.0 as with the posted link from sandeep-reddy, you could pin the version that is installed by using these lines in the Dockerfile (credit Michael Herman).

    Edit: Looks like you still need the line stdin_open:true in docker-compose.yml file for it to work.

    RUN npm ci
    RUN npm install react-scripts@3.4.0 -g --silent
    

提交回复
热议问题