buildkit

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package buildkit implements a compiler for turning Blubber configuration into a valid llb.State graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

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

Build handles BuildKit client requests for the Blubber gateway.

When performing a multi-platform build, the final exported manifest will be an OCI image index (aka "fat" manifest) and multiple sub manifests will be created for each platform that contain the actual image layers.

See https://github.com/opencontainers/image-spec/blob/main/image-index.md

For a single platform build, the export will be a normal single manifest with image layers.

See https://github.com/opencontainers/image-spec/blob/main/manifest.md

func Compile

func Compile(
	ctx context.Context,
	bo *BuildOptions,
	cfg *config.Config,
	platform *oci.Platform,
) (*build.Target, error)

Compile takes a parsed config.Config and a configured variant name and returns a compiled build.Target

Types

type BuildOptions added in v0.24.0

type BuildOptions struct {
	// Whether to run the target's variant entrypoint during the build process. The entrypoint
	// command will be executed by BuildKit while creating the image
	RunEntrypoint bool

	// Environment variables to use when running the entrypoint.
	RunEnvironment map[string]string

	// Additional arguments to be added to the entrypoint command
	EntrypointArgs []string

	*build.Options
}

BuildOptions contains options specific to the BuildKit frontend as well as options for the build.Target.

func ParseBuildOptions added in v0.24.0

func ParseBuildOptions(clientBuildOpts client.BuildOpts) (*BuildOptions, error)

ParseBuildOptions parses and returns a newly created BuildOptions from the given build options.

Jump to

Keyboard shortcuts

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