improve Dockerfile (resulting in much smaller Image) #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @clusterzx ,
this PR has changes regarding the Dockerfile.
These changes result in a much smaller image (645MB instead of 1.37GB).
It also uses npm ci instead of npm install, which is recommended in CI builds.
I tested the build locally and it worked for me, but maybe a bit more testing would be good.
EDIT: I see that the NODE_ENV is defined in ecosystem.config.js already, so adding it to the Dockerfile would be redundant - could you explain what's the reason to use pm2?