build

package
v0.0.0-...-db22637 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuilderVersion

func BuilderVersion(features map[string]bool) types.BuilderVersion

BuilderVersion derives the default docker builder version from the config.

The default on Linux is version "2" (BuildKit), but the daemon can be configured to recommend version "1" (classic Builder). Windows does not yet support BuildKit for native Windows images, and uses "1" (classic builder) as a default.

This value is only a recommendation as advertised by the daemon, and it is up to the client to choose which builder to use.

func NewRouter

func NewRouter(b Backend, d experimentalProvider) router.Router

NewRouter initializes a new build router

Types

type Backend

type Backend interface {
	// Build a Docker image returning the id of the image
	// TODO: make this return a reference instead of string
	Build(context.Context, backend.BuildConfig) (string, error)

	// Prune build cache
	PruneCache(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
	Cancel(context.Context, string) error
}

Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.

Jump to

Keyboard shortcuts

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