buildkit

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	WorkingDir = "/app"
)

Variables

View Source
var (
	PlatformLinuxAMD64 = BuildPlatform{
		OS:           "linux",
		Architecture: "amd64",
	}
	PlatformLinuxARM64 = BuildPlatform{
		OS:           "linux",
		Architecture: "arm64",
		Variant:      "v8",
	}
)

Functions

func Build

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

func BuildWithBuildkitClient

func BuildWithBuildkitClient(appDir string, plan *plan.BuildPlan, opts BuildWithBuildkitClientOptions) error

func StartFrontend

func StartFrontend()

Types

type BuildPlatform

type BuildPlatform struct {
	OS           string
	Architecture string
	Variant      string
}

func DetermineBuildPlatformFromHost

func DetermineBuildPlatformFromHost() BuildPlatform

func (BuildPlatform) String

func (p BuildPlatform) String() string

func (BuildPlatform) ToPlatform

func (p BuildPlatform) ToPlatform() specs.Platform

type BuildWithBuildkitClientOptions

type BuildWithBuildkitClientOptions struct {
	ImageName    string
	DumpLLB      bool
	OutputDir    string
	ProgressMode string
	SecretsHash  string
	Secrets      map[string]string
	Platform     BuildPlatform
	ImportCache  string
	ExportCache  string
}

type ConvertPlanOptions

type ConvertPlanOptions struct {
	BuildPlatform BuildPlatform
	SecretsHash   string
	CacheKey      string
	SessionID     string
}

type Image

type Image struct {
	specs.Image

	// Config defines the execution parameters which should be used as a base when running a container using the image.
	Config specs.ImageConfig `json:"config,omitempty"`

	// Variant defines platform variant. To be added to OCI.
	Variant string `json:"variant,omitempty"`
}

Image is the JSON structure which describes some basic information about the image. This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.

func ConvertPlanToLLB

func ConvertPlanToLLB(plan *p.BuildPlan, opts ConvertPlanOptions) (*llb.State, *Image, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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