I have some knowledge and understanding of containers and images, and I have two issues.
-
In my opinion, a container can be seen as a process whose resource view has been changed. Is there a relationship between the size of the container (referring only to the memory space used by the container) and the size and number of layers of the image? It seems that using smaller underlying images to build images is a recommended approach, such as replacing Ubuntu with Alpine. However, is there any experimental or theoretical explanation, or is it just practical experience?
-
Will there be any additional burden when using images with multiple or large layers? For example, how long does it take to mount overlay fs?
I used Docker Stats and Docker Images to check the relationship between container memory consumption and image size, but it doesn’t seem to be directly related.
docker stats
docker images
breezeTuT is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.