Skip to main content

Module rootfs

Module rootfs 

Source
Expand description

Root filesystem management for Microsandbox sandboxes.

This module provides functionality for managing root filesystems used by Microsandbox sandboxes. It handles the creation, extraction, and merging of filesystem layers following OCI (Open Container Initiative) specifications.

Constants§

OPAQUE_WHITEOUT_MARKER
The opaque directory marker file name used in OCI layers.
WHITEOUT_PREFIX
The prefix for whiteout files in OCI layers.

Functions§

copy_dir_recursive
Recursively copies a directory from source to destination, preserving file permissions.
patch_with_default_dns_settings
Updates the /etc/resolv.conf file in the guest rootfs to add default DNS servers if none exist. Creates the file if it doesn’t exist.
patch_with_sandbox_scripts
Updates a rootfs by adding sandbox script files to a /.sandbox_scripts directory.
patch_with_stat_override
Sets the user.containers.override_stat xattr on the rootfs directory.
patch_with_virtiofs_mounts
Updates the /etc/fstab file in the guest rootfs to mount the mapped directories. Creates the file if it doesn’t exist.