From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Systemd containers

Systemd containers

- So you can manually create your containers. You can also use systemd. So containers just provide a way to run a process in multiple namespaces with cgroups applied. Docker and Podman are very common ways to implement containers, but you can also easily implement them on Linux using systemd-nspawn. systemd-nspawn is mainly about running applications in perfectly isolated environment, and not so much about providing a distribution model for applications as is the case with Docker registry and others. What does that mean? It means that they don't have a registry. You need to create the container images for yourself. So that means that, to create your own container, you need a chroot file system that contains all that is required. And in the next demo, I am going to show you how to use debootstrap, which is a Debian-based package to install systemd-nspawn containers on Ubuntu. The systemd container package contains systemd-nspawn as well as machinectl, which is the main tool to manage…

Contents