buildkit

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultImage = "moby/buildkit"

DefaultImage is the default BuildKit container image name.

Variables

This section is empty.

Functions

func ImageRef added in v0.0.5

func ImageRef(templateOpts map[string]string) string

ImageRef returns the full "image:tag" reference for the buildkitd container. It resolves ci_buildkit_image and ci_buildkit_version from templateOpts, falling back to DefaultImage and Version respectively.

Types

type BuildOpts

type BuildOpts struct {
	ImageName    string
	Platform     string
	TarFile      string
	BuildArgs    map[string]string
	Secrets      map[string][]byte
	Labels       map[string]string
	Cache        cache.BuildkitCache
	BuildContext build_context.BuildContext

	// RegistryRef is the full image reference to push to (e.g. "localhost:8500/ubuntu:22.04.linux-amd64").
	// When set, BuildKit pushes directly to the registry via the image exporter.
	RegistryRef string
	// RegistryInsecure allows pushing over HTTP (for local registries).
	RegistryInsecure bool
	// DockerMediaTypes forces the image exporter to emit Docker-scheme media
	// types instead of OCI. Set when the target registry rejects pure OCI
	// (e.g. Docker Hub).
	DockerMediaTypes bool

	// OCIStores maps store IDs to content stores for OCI layout named contexts.
	// Used to resolve inter-image dependencies without a registry.
	OCIStores map[string]content.Store
	// NamedContexts maps frontend attribute keys (e.g. "context:__hive__/ubuntu:22.04")
	// to OCI layout references (e.g. "oci-layout:hive-ubuntu-22.04@sha256:...").
	NamedContexts map[string]string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, endpoint string) (*Client, error)

func (*Client) Build

func (c *Client) Build(ctx context.Context, opts *BuildOpts, statusUpdateHandler func(chan *client.SolveStatus) error) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Version

func (c *Client) Version(ctx context.Context) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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