What are images?
In Linux, everything is a file. The whole operating system is a filesystem with files and folders stored on the local disk. This is an important fact to remember when looking at what container images are. As we will see, an image is a big tarball containing a filesystem. More specifically, it contains a layered filesystem.
Tarball
A tarball (also known as a .tar
archive) is a single file that contains multiple files or directories. It is a common archive format that is used to distribute software packages and other collections of files. The .tar
archive is usually compressed using gzip or another compression format to reduce its size. Tarballs are commonly used in Unix-like operating systems, including Linux and macOS, and can be unpacked using the tar
command.
The layered filesystem
Container images are templates from which containers are created. These images are not made up of just one monolithic block but are composed of many layers. The first layer...