buildkit

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultAddr = "unix:///run/buildkit/buildkitd.sock"
)

Variables

This section is empty.

Functions

func ArrayFile added in v0.6.0

func ArrayFile(input []string) []byte

func ExtractFileFromState added in v0.6.0

func ExtractFileFromState(ctx context.Context, c gwclient.Client, st *llb.State, path string) ([]byte, error)

Extracts the bytes of the file denoted by `path` from the state `st`.

func NewClient added in v0.4.0

func NewClient(ctx context.Context, bkOpts Opts) (*client.Client, error)

NewClient returns a new buildkit client with the given addr. If addr is empty it will first try to connect to docker's buildkit instance and then fallback to DefaultAddr.

func Sh added in v0.7.0

func Sh(cmd string) llb.RunOption

func ValidateClient added in v0.4.0

func ValidateClient(ctx context.Context, c *client.Client) error

ValidateClient checks to ensure the connected buildkit instance supports the features required by copa.

func WithArrayFile added in v0.6.0

func WithArrayFile(s *llb.State, path string, contents []string) llb.State

func WithFileBytes added in v0.6.0

func WithFileBytes(s *llb.State, path string, contents []byte) llb.State

func WithFileString added in v0.6.0

func WithFileString(s *llb.State, path, contents string) llb.State

Types

type Config

type Config struct {
	ImageName         string
	Client            gwclient.Client
	ConfigData        []byte
	PatchedConfigData []byte
	Platform          *ispec.Platform
	ImageState        llb.State
	PatchedImageState llb.State
}

func InitializeBuildkitConfig

func InitializeBuildkitConfig(ctx context.Context, c gwclient.Client, userImage string) (*Config, error)

type Opts added in v0.5.0

type Opts struct {
	Addr       string
	CACertPath string
	CertPath   string
	KeyPath    string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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