$ docker-compose logs
このコマンドで、docker起動時のログを見る事ができます。
僕の場合は、vueがすぐに停止してしまい、こんなエラーが出てきました。
front_1 | npm ERR! errno ENOENT
front_1 | npm ERR! app@0.1.0 serve: `vue-cli-service serve`
front_1 | npm ERR! spawn ENOENT
front_1 | npm ERR!
front_1 | npm ERR! Failed at the app@0.1.0 serve script.
front_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
front_1 | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
front_1 |
front_1 | npm ERR! A complete log of this run can be found in:
front_1 | npm ERR! /root/.npm/_logs/2020-11-26T00_35_26_684Z-debug.log
front_1 |
front_1 | > app@0.1.0 serve /app
front_1 | > vue-cli-service serve
front_1 |
front_1 | sh: vue-cli-service: not found
front_1 | npm ERR! code ELIFECYCLE
front_1 | npm ERR! syscall spawn
front_1 | npm ERR! file sh
front_1 | npm ERR! errno ENOENT
front_1 | npm ERR! app@0.1.0 serve: `vue-cli-service serve`
front_1 | npm ERR! spawn ENOENT
front_1 | npm ERR!
front_1 | npm ERR! Failed at the app@0.1.0 serve script.
front_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
front_1 | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
front_1 |
front_1 | npm ERR! A complete log of this run can be found in:
front_1 | npm ERR! /root/.npm/_logs/2020-11-26T00_36_01_318Z-debug.log
front_1 | mba:project hoge$
原因がわかったので、これをググります。