Union Mount Filesystems (OverlayFS)

The Technical definition of Union Mount Filesystems – Union Mount Filesystems (overlayfs) allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system. Contents of directories which have the same path within the merged branches will be seen together in a single merged directory, within the new virtual filesystem.”

OverlayFS is an example of Union Mount Filesystems that Docker uses. It allows you to take separate file systems and combine them into a unified view that you can then operate on. Let’s understand this with the help of an example:

So in the image you can see we have a lower file system and an upper file system with various files. We have got file – 1, file -2b and file – 4 in the lower layer. And in the upper layer we have a different file that is file – 3 and then we also have a deleted file file – 4. When we combined these layers into the overlay we ended up with a combination of those two things where the upper layer takes precedence over the lower layer and so we have file – 1, file – 2b and file – 3.

While namespaces and C groups are sort of what make containers possible. This concept of a union map file system is what makes containers practical. Because of this layered approach we are able to share lower layers and cache those layers such that the amount of data that needs to be transferred and stored for container images is much smaller. This is because many images can share a common lower layer and then only some subset of the upper layers can be modified which enables us to move less data when we need to get a container image onto a system and allocate less space if we’re running multiple copies of the same container.

Understanding the Docker Desktop Architecture and Linux Building Block for Containers

In this article we are going to do a technology deep dive and start understanding the foundational Linux kernel features that software like Docker is using to make the containers work and provide those isolated environments that we all use. then towards the end of this section, we’ll also take a look at the docker system architecture.

Similar Reads

The building blocks of containers

There are three technologies that make up the core of a container....

Namespaces

The technical definition of Namespaces – “A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. Changes to the global resource are visible to other processes that are members of the namespace but are invisible to other processes.”...

C groups or Control groups

The technical definition of Control groups – “a Linux kernel feature which allow processes to be organized into hierarchical groups whose usage of various types of resources can then be limited and monitored.”...

Union Mount Filesystems (OverlayFS)

The Technical definition of Union Mount Filesystems – “Union Mount Filesystems (overlayfs) allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system. Contents of directories which have the same path within the merged branches will be seen together in a single merged directory, within the new virtual filesystem.”...

Docker Desktop Architecture

...

Docker Desktop walkthrough

In this section we will go through the Docker Desktop application and understand how to use it to work with containers. Firstly you can download Docker Desktop from the Docker official website. You will automatically get Docker upon installing the Docker Desktop....

Conclusion

We started out with the building blocks of containers which are Namespaces, Control groups and Union file systems. In summary, Namespaces are mechanism used to wrap any global system resource such that the processes that are running within the namespace thinks that they have their own isolated instance of that resource. Control groups are also similar to this but we use control groups for explicitly giving the control of certain resources to the processes....

FAQs on Docker Desktop Architecture and Linux Building Block for Containers

1. Is Docker Engine Same as Docker Desktop?...

Contact Us