package overlay

import "github.com/moby/buildkit/util/overlay"

Index

Functions

func Changes

func Changes(ctx context.Context, changeFn fs.ChangeFunc, upperdir, upperdirView, base string) error

Changes is continuty's `fs.Change`-like method but leverages overlayfs's "upperdir" for computing the diff. "upperdirView" is overlayfs mounted view of the upperdir that doesn't contain whiteouts. This is used for computing changes under opaque directories.

func GetOverlayLayers

func GetOverlayLayers(m mount.Mount) ([]string, error)

GetOverlayLayers returns all layer directories of an overlayfs mount.

func GetUpperdir

func GetUpperdir(lower, upper []mount.Mount) (string, error)

GetUpperdir parses the passed mounts and identifies the directory that contains diff between upper and lower.

func IsOverlayMountType

func IsOverlayMountType(mnt mount.Mount) bool

IsOverlayMountType returns true if the mount type is overlay-based

func WriteUpperdir

func WriteUpperdir(ctx context.Context, w io.Writer, upperdir string, lower []mount.Mount) error

WriteUpperdir writes a layer tar archive into the specified writer, based on the diff information stored in the upperdir.

Source Files

overlay.go overlay_linux.go

Version
v0.19.0-rc3
Published
Jan 17, 2025
Platform
linux/amd64
Imports
16 packages
Last checked
2 hours ago

Tools for package owners.