package mounttree

import "github.com/dotcloud/docker/internal/mounttree"

Index

Functions

func SwitchRoot

func SwitchRoot(path string) error

SwitchRoot changes path to be the root of the mount tree and changes the current working directory to the new root.

This function bind-mounts onto path; it is the caller's responsibility to set the desired propagation mode of path's parent mount beforehand to prevent unwanted propagation into different mount namespaces.

Source Files

switchroot_linux.go

Version
v26.1.3+incompatible
Published
May 15, 2024
Platform
linux/amd64
Imports
6 packages
Last checked
8 minutes ago

Tools for package owners.