archive

package
v4.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyWithTar

func CopyWithTar(src, dst string, disableIDMapping bool) error

CopyWithTar is a wrapper around the docker pkg/archive/copy CopyWithTar function allowing unprivileged use. It forces ownership to the current uid/gid in unprivileged situations. No file may be copied into a location above dst, and hard links / symlinks may not target a file above dst.

func CopyWithTarWithRoot added in v4.1.4

func CopyWithTarWithRoot(src, dst, dstRoot string, disableIDMapping bool) error

CopyWithTarWithRoots copies files as with CopyWithTar, but uses a custom ar.Untar which checks that hard link / symlink targets are under dstRoot, and not dst. This allows copying a directory src to dst, where the directory contains a link to a location above dst, but under dstroot.

func UnpackWithRoot added in v4.1.4

func UnpackWithRoot(decompressedArchive io.Reader, dest, destRoot string, options *da.TarOptions) error

Unpack unpacks the decompressedArchive to dest with options. The target of any symlinks and hard links must be under destRoot. This differs from the unmodified upstream code, which requires that they are under dest.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL