Starting npm start with docker?

Solved a similar issue by modifying npm start into package.json (line 6).

Try to add --host 0.0.0.0 after ng serve.

"start": "ng serve --host 0.0.0.0",

In last result, debug with curl http://localhost:6000

It might be called a websocket issue


I suspect that your ports might be backwards in your docker run command. If you are running your react app on port 6000, and want to expose this to the outside on port 80, then you should run your container with ...

docker run -p 80:6000 myapp

Usage: docker run -p <HOST_PORT>:<CONTAINER_PORT> <APP_NAME>