![]() It turns out you can do something similar in Docker too with a multi-stage build. When a Git repository becomes bigger, you can choose to squash the history into a single commit and forget about the past. Squash multiple layers into one with multi-stage Docker builds ![]() In the past, it was a good practice to combine several RUN statements on a single line. The size of your repository increases with the number of layers because Git has to store all the changes between commits. Git repositories are similar in this respect. ![]() Layers use space and the more layer you have, the heavier the final image is. This way is much more efficient to share images. In fact, when you request an image from a registry you download only the layers that you don't own already. And like git commits they're handy if you share them with other repositories or images. Docker layers store the difference between the previous and the current version of the image.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |