patch

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 50 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ARM64 = "arm64"
)
View Source
const (
	LINUX = "linux"
)

Variables

This section is empty.

Functions

func NewPatchCmd

func NewPatchCmd() *cobra.Command

func Patch

func Patch(ctx context.Context, opts *types.Options) error

Patch command applies package updates to an OCI image given a vulnerability report for a given set of options.

Types

type BuildConfig added in v0.11.1

type BuildConfig struct {
	SolveOpt        client.SolveOpt
	ShouldExportOCI bool
	PipeWriter      io.WriteCloser
}

BuildConfig holds configuration for building and exporting images.

type Context added in v0.11.1

type Context struct {
	Context context.Context
	Client  gwclient.Client
}

Context wraps the context and gateway client for core operations.

type Options added in v0.11.1

type Options struct {
	// Image and platform information
	ImageName      string
	TargetPlatform *types.PatchPlatform

	// Update information
	Updates          *unversioned.UpdateManifest
	ValidatedUpdates *unversioned.UpdateManifest

	// Working environment
	WorkingFolder string
	IgnoreError   bool

	// Optional error channel for patch command integration
	ErrorChannel chan error

	// If true, return the BuildKit state instead of solving it
	ReturnState bool

	// EOL configuration
	ExitOnEOL bool
}

Options contains the parameters needed for the core patching logic.

type Result added in v0.11.1

type Result struct {
	// BuildKit gateway result (nil if ReturnState is true)
	Result *gwclient.Result

	// Package manager information
	PackageType      string
	ErroredPackages  []string
	ValidatedUpdates []unversioned.UpdatePackage

	// BuildKit state and config (only set if ReturnState is true)
	PatchedState *llb.State
	ConfigData   []byte
}

Result contains the result of the core patching operation.

func ExecutePatchCore added in v0.11.1

func ExecutePatchCore(patchCtx *Context, opts *Options) (*Result, error)

ExecutePatchCore executes the core patching logic that can be used by both the patch command and a buildkit frontend.

Jump to

Keyboard shortcuts

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