llbutil

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package llbutil offers helper functions for manipulating and creating Low-Level Builder (LLB) operations and dependencies.

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) pllb.State

WithDependency creates a fake dependency between two states.

Types

This section is empty.

Directories

Path Synopsis
Package authprovider manages registry and token authentication for buildkit sessions, supporting multiple providers and Podman.
Package authprovider manages registry and token authentication for buildkit sessions, supporting multiple providers and Podman.
Package llbfactory constructs LLB (Low-Level Builder) graphs for local files and preconstructed states.
Package llbfactory constructs LLB (Low-Level Builder) graphs for local files and preconstructed states.
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.
Package secretprovider implements mechanisms to supply secrets (like AWS credentials) securely to the buildkit solver.
Package secretprovider implements mechanisms to supply secrets (like AWS credentials) securely to the buildkit solver.

Jump to

Keyboard shortcuts

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