llbutil

package
v0.8.17 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

DefaultPathEnv is the default PATH to use.

Functions

func Abs

func Abs(ctx context.Context, s pllb.State, p string) (string, error)

Abs prepends the working dir to the given path, if the path is relative.

func CopyOp

func CopyOp(
	ctx context.Context,
	srcState pllb.State,
	srcs []string,
	destState pllb.State,
	dest string,
	allowWildcard, isDir, keepTs bool,
	chown string,
	chmod *fs.FileMode,
	ifExists, symlinkNoFollow, merge bool,
	opts ...llb.ConstraintsOpt,
) (pllb.State, error)

CopyOp is a simplified llb copy operation.

func CopyWithRunOptions

func CopyWithRunOptions(
	srcState pllb.State, src, dest string, platr *platutil.Resolver, opts ...llb.RunOption,
) pllb.State

CopyWithRunOptions copies from `src` to `dest` and returns the result in a separate LLB State. This operation is similar llb.Copy, however, it can apply llb.RunOptions (such as a mount) Internally, the operation runs on the internal COPY image used by Dockerfile.

func DockerTagSafe

func DockerTagSafe(tag string) string

DockerTagSafe turns a string into a safe Docker tag.

func PlatformSpecificImageName

func PlatformSpecificImageName(imgName string, platform platutil.Platform) (string, error)

PlatformSpecificImageName returns the PlatformSpecificImageName.

func StateToRef

func StateToRef(
	ctx context.Context,
	gwClient gwclient.Client,
	state pllb.State,
	noCache bool,
	platr *platutil.Resolver,
	cacheImports []string,
) (gwclient.Reference, error)

StateToRef takes an LLB state, solves it using gateway and returns the ref.

func WithDependency

func WithDependency(
	state, depState pllb.State, stateStr, depStr string, platr *platutil.Resolver, opts ...llb.RunOption,
) pllb.State

WithDependency creates a fake dependency between two states.

Types

This section is empty.

Directories

Path Synopsis
Package pllb is a wrapper around llb, which makes it compatible with concurrent code.
Package pllb is a wrapper around llb, which makes it compatible with concurrent code.

Jump to

Keyboard shortcuts

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