Making a docker application through docker compose, the log terminal does not return any of the console logging returned from my node server
Cause & Solution
Turn out the problem comes from my mistakes on making a "command substitution" in entrypoint of the dockerFile. Here is my entrypoint command
ENTRYPOINT /bin/bash -c "npm install && if [ $NODE_ENV == '"development"' ]; then \ $(nodemon --ignore node_modules/ mongoEngine.js); else $(node mongoEngine.js); fi"
Outputting in command substitution mode will not be captured. Remove the $(...) quoting solves the problem
References
- https://unix.stackexchange.com/questions/440088/what-is-command-substitution-in-a-shell
- https://www.cnblogs.com/sparkdev/p/8461576.html
沒有留言:
張貼留言