DEV Community

Omkar Patil
Omkar Patil

Posted on • Originally published at omkarpatil.dev on

Exploring linux underpinnings of containers

Some time ago, I played around linux primitives that power containers and documented my learnings on Github. Hope it proves useful to someone trying to do the same.

GitHub logo shikshan / containers

Exploring the linux underpinnings of docker and containers

How containers work

Exploring the linux underpinnings of docker and containers.

References

All credit goes to the authors of the following wonderful blog posts.

Setup

The project contains a Vagrantfile that runs a Fedora 31 VM.

Setup the VM using: ./setup.sh.

The project root directory on the host is mapped to /vagrant in the guest. All the action below takes place in the /vagrant directory in the guest. Change into /vagrant directory in the VM before carrying out steps below:

$ vagrant ssh
Last login: Sun Nov 24 19:06:40 2019 from 10.0.2.2
[vagrant@localhost ~]$ cd /vagrant
[vagrant@localhost vagrant]$
Enter fullscreen mode Exit fullscreen mode

Container file systems

Container images are just tarballs (or a tarball of tarballs where each layer in an image is a tarball).

Creating a container file system

The easiest way to get a container file system is to export it from any existing docker container on…

Top comments (0)