pivot root
A Linux system call that swaps a process to a new root directory so it can no longer see the old one.
In more detail
Container runtimes such as runc use pivot_root inside a new mount namespace to make the prepared image filesystem become /. It is stronger than the older chroot because the old root can then be unmounted completely.
Related terms
- system call — A request a program makes to the kernel, such as open this file or start a new process.
- mount namespace — The namespace that gives a process its own list of mounted filesystems, and so its own view of the directory tree.
- root filesystem — The top of the directory tree, written as a single slash, under which every other file and directory hangs.
- runc — The small program that actually creates a container by making the kernel calls for namespaces, control groups and the root filesystem.
Taught in
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers