Docker container exiting immediately after starting when using npm init react-app
I tried downgrading but it didn't work. What worked for me is in docker-compose
file in the react app sector I added:
stdin_open: true
This solution is also suggested here: issue on github
docker run -it -p 80:3000 imagename
resolve my problem.
Running the command with -it
worked for me:
docker run -it -p 3001:3000 Imageid