DEV Community

Discussion on: Improve your Dockerfile, best practices

Collapse
 
losinggeneration profile image
Harley • Edited

Minimize the layers

Cache misses are more likely to happen when grouping RUN commands. If it inflates the end image too much, multi-stage images can be used to have a more bare final image without all the build stages.

Edit: otherwise, I'd say these are all sensible guidelines.