RUN yum install -y nginx contains all the new files created by yum.FROM fedora results in the base Fedora image layer.When using the overlay backend, the container runtime fetches and extracts each layer to a different directory.Īt runtime, each layer is used as a lower layer for the final container overlay filesystem mount.Ī Containerfile (Dockerfile) made of the following lines results in a series of different layers: These layers are stored on a registry as a compressed tarball archive. Each layer contains a subset of the files in the image. Open Container Initiative (OCI) container images are distributed as a series of layers. Let the Linux kernel know when content can be shared in memoryĬontainer administrators can do all of this by using content previously stored on disk rather than pulling and duplicating the content.This article shows new technologies that have been merged into container tools to: Because of the way we currently store container images, this is very common. When you run containers with images, if the same /usr/lib/libc.so.6 is in multiple different images, then the kernel gets confused and loads several versions of the same content into memory, wasting resources. For example, if you have 10 different programs running simultaneously that use libc, the /usr/lib/libc.so.6 code loads into kernel memory only once. The Linux kernel is smart enough to know that if two different processes load the same container (such as a shared library) into memory, they should load it into memory just once. These images often contain many duplicate files.Īnother thing to think about is kernel memory. Have you ever examined how much space your container images are taking on disk? Some users run out of space in their home directories just because they have pulled down hundreds or thousands of container images. Large images also lead to storage problems. A practical introduction to container terminology.
0 Comments
Leave a Reply. |