Reduce size of Docker image

fix: Reduce size of Docker image (#2779)
Reduce size of Docker imagefixreduce size docker image

Committed by paescuj

commit message
fix: Reduce size of Docker image (#2779)

* fix: Ordering in Dockerfile
 
Folders node_modules & tmp/cache are currently not removed and thus the Docker image
size is pretty big.
 
I don't think we can remove app/assets & vendor/assets though as the
app won't work without those.
 
* Expose port 3000 in Docker image
* Further Dockerfile optimization
 
Co-authored-by: Vishnu Narayanan <[email protected]>

Editor assessment

The subject states the goal plainly, the Docker image is made smaller, and the body does the real work of an exemplary message: it explains the mechanism, layer ordering in the Dockerfile, names what was removed, node_modules and the tmp cache, and reasons about a trade-off, concluding that app and vendor assets cannot go because the application would break. That is genuine engineering rationale a reader can learn from, not a change list. Fix is a defensible type for a size defect. No scope needed; Co-authored-by is well formed. An exemplar.

Browse categories

More fix examples · Back to search