dockerui

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLocalNameContext    = "context"
	DefaultLocalNameDockerfile = "dockerfile"
	DefaultDockerfileName      = "Dockerfile"
	DefaultDockerignoreName    = ".dockerignore"
	EmptyImageName             = "scratch"
)

Variables

This section is empty.

Functions

func DefaultMainContext

func DefaultMainContext(opts ...llb.LocalOption) *llb.State

func DetectGitContext

func DetectGitContext(ref string, keepGit bool) (*llb.State, bool)

func DetectHTTPContext

func DetectHTTPContext(ref string) (*llb.State, string, bool)

func WithInternalName

func WithInternalName(name string) llb.ConstraintsOpt

Types

type BuildFunc

type BuildFunc func(ctx context.Context, platform *ocispecs.Platform, idx int) (client.Reference, *image.Image, error)

type Client

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

func NewClient

func NewClient(c client.Client) (*Client, error)

func (*Client) Build

func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, error)

func (*Client) BuildOpts

func (bc *Client) BuildOpts() client.BuildOpts

func (*Client) HandleSubrequest

func (bc *Client) HandleSubrequest(ctx context.Context, h RequestHandler) (*client.Result, bool, error)

func (*Client) IsNoCache

func (bc *Client) IsNoCache(name string) bool

func (*Client) MainContext

func (bc *Client) MainContext(ctx context.Context, opts ...llb.LocalOption) (*llb.State, error)

func (*Client) NamedContext

func (bc *Client) NamedContext(ctx context.Context, name string, opt ContextOpt) (*llb.State, *image.Image, error)

func (*Client) ReadEntrypoint

func (bc *Client) ReadEntrypoint(ctx context.Context, lang string, opts ...llb.LocalOption) (*Source, error)

type Config

type Config struct {
	BuildArgs        map[string]string
	CacheIDNamespace string
	CgroupParent     string
	Epoch            *time.Time
	ExtraHosts       []llb.HostIP
	Hostname         string
	ImageResolveMode llb.ResolveMode
	Labels           map[string]string
	NetworkMode      pb.NetMode
	ShmSize          int64
	Target           string
	Ulimits          []pb.Ulimit

	CacheImports           []client.CacheOptionsEntry
	TargetPlatforms        []ocispecs.Platform // nil means default
	BuildPlatforms         []ocispecs.Platform
	MultiPlatformRequested bool
	SBOM                   *SBOM
}

type ContextOpt

type ContextOpt struct {
	NoDockerignore bool
	AsyncLocalOpts func() []llb.LocalOption
	Platform       *ocispecs.Platform
	ResolveMode    string
	CaptureDigest  *digest.Digest
}

type RequestHandler

type RequestHandler struct {
	Outline     func(context.Context) (*outline.Outline, error)
	ListTargets func(context.Context) (*targets.List, error)
	AllowOther  bool
}

type ResultBuilder

type ResultBuilder struct {
	*client.Result
	// contains filtered or unexported fields
}

func (*ResultBuilder) EachPlatform

func (rb *ResultBuilder) EachPlatform(ctx context.Context, fn func(ctx context.Context, id string, p ocispecs.Platform) error) error

func (*ResultBuilder) Finalize

func (rb *ResultBuilder) Finalize() (*client.Result, error)

type SBOM

type SBOM struct {
	Generator string
}

type Source

type Source struct {
	*llb.SourceMap
	Warn func(context.Context, string, client.WarnOpts)
}

Jump to

Keyboard shortcuts

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