Help us shape the future of Go! Take the 2026 Go Developer Survey

dockerui

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 50 Imported by: 42

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DefaultMainContext added in v0.13.0

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

func DetectGitContext

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

func DetectHTTPContext

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

func ReadFile added in v0.33.1

func ReadFile(ctx context.Context, ref client.Reference, filename string) ([]byte, error)

ReadFile reads filename from ref, refusing files larger than maxFileSize. Oversized files are rejected on their reported size so that nothing is read from them, and the read itself carries a range so that no more than maxFileSize+1 bytes are ever loaded even when the size could not be checked.

func WithInternalName

func WithInternalName(name string) llb.ConstraintsOpt

Types

type BuildFunc

type BuildFunc func(ctx context.Context, platform *ocispecs.Platform, idx int) (*BuildResult, error)

type BuildResult added in v0.29.0

type BuildResult struct {
	Reference client.Reference
	Image     *dockerspec.DockerOCIImage
	BaseImage *dockerspec.DockerOCIImage
	Epoch     *time.Time
}

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) DockerIgnorePatterns added in v0.15.0

func (bc *Client) DockerIgnorePatterns(ctx context.Context) ([]string, error)

func (*Client) GatewayClient added in v0.30.0

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

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(name string, opt ContextOpt) (*NamedContext, error)

func (*Client) ReadEntrypoint

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

func (*Client) ResolveMainContextSourceDateEpoch added in v0.30.0

func (bc *Client) ResolveMainContextSourceDateEpoch(ctx context.Context) (*time.Time, error)

type Config

type Config struct {
	BuildArgs        map[string]string
	CacheIDNamespace string
	CgroupParent     string
	ExtraHosts       []llb.HostIP
	Hostname         string
	ImageResolveMode llb.ResolveMode
	Labels           map[string]string
	NetworkMode      pb.NetMode
	GitAdvice        bool
	ShmSize          int64
	Target           string
	Ulimits          []*pb.Ulimit
	LinuxResources   *pb.LinuxResources
	Devices          []*pb.CDIDevice
	LinterConfig     *linter.Config

	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 NamedContext added in v0.20.0

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

func (*NamedContext) Load added in v0.20.0

type RequestHandler

type RequestHandler struct {
	Outline     func(context.Context) (*outline.Outline, error)
	ListTargets func(context.Context) (*targets.List, error)
	Lint        func(context.Context) (*lint.LintResults, error)
	ConvertLLB  func(context.Context) (*convertllb.Result, 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
	Parameters map[string]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