Documentation
¶
Index ¶
- Constants
- func DefaultMainContext(opts ...llb.LocalOption) *llb.State
- func DetectGitContext(ref string, keepGit *bool, opts ...llb.GitOption) (*llb.State, bool, error)
- func DetectHTTPContext(ref string) (*llb.State, string, bool)
- func ReadFile(ctx context.Context, ref client.Reference, filename string) ([]byte, error)
- func WithInternalName(name string) llb.ConstraintsOpt
- type BuildFunc
- type BuildResult
- type Client
- func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, error)
- func (bc *Client) BuildOpts() client.BuildOpts
- func (bc *Client) DockerIgnorePatterns(ctx context.Context) ([]string, error)
- func (bc *Client) GatewayClient() client.Client
- func (bc *Client) HandleSubrequest(ctx context.Context, h RequestHandler) (*client.Result, bool, error)
- func (bc *Client) IsNoCache(name string) bool
- func (bc *Client) MainContext(ctx context.Context, opts ...llb.LocalOption) (*llb.State, error)
- func (bc *Client) NamedContext(name string, opt ContextOpt) (*NamedContext, error)
- func (bc *Client) ReadEntrypoint(ctx context.Context, lang string, opts ...llb.LocalOption) (*Source, error)
- func (bc *Client) ResolveMainContextSourceDateEpoch(ctx context.Context) (*time.Time, error)
- type Config
- type ContextOpt
- type NamedContext
- type RequestHandler
- type ResultBuilder
- type SBOM
- type Source
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 ReadFile ¶ added in v0.33.1
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 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 (*Client) DockerIgnorePatterns ¶ added in v0.15.0
func (*Client) GatewayClient ¶ added in v0.30.0
func (*Client) HandleSubrequest ¶
func (*Client) MainContext ¶
func (*Client) NamedContext ¶
func (bc *Client) NamedContext(name string, opt ContextOpt) (*NamedContext, error)
func (*Client) ReadEntrypoint ¶
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 NamedContext ¶ added in v0.20.0
type NamedContext struct {
// contains filtered or unexported fields
}
func (*NamedContext) Load ¶ added in v0.20.0
func (nc *NamedContext) Load(ctx context.Context) (*llb.State, *dockerspec.DockerOCIImage, error)
type RequestHandler ¶
type ResultBuilder ¶
func (*ResultBuilder) EachPlatform ¶
Click to show internal directories.
Click to hide internal directories.