tl;dr In docker containers, after the first run, the chained command will not run.
I'm building a dev flow with docker for a nodejs project and I'm having an issue with a chained command inside the docker container.
The command in question is: tsc -w & nodemon -q -w dist dist/index.js
When I run this locally, it works fine and after code change the nodemon instance reloads and the changes are reflected in the output. If I run this on the docker container, the first run will work (i.e. it shows the tsc step then the code's output). However, after the first run, only the tsc -w step is run.
Is there any reason why this might happen?
Extra info: