package dockerfile2llb

import "github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb"

Index

Functions

func Dockefile2Outline

func Dockefile2Outline(ctx context.Context, dt []byte, opt ConvertOpt) (*outline.Outline, error)

func Dockerfile2LLB

func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, *Image, *SBOMTargets, error)

func ListTargets

func ListTargets(ctx context.Context, dt []byte) (*targets.List, error)

func WithInternalName

func WithInternalName(name string) llb.ConstraintsOpt

Types

type ConvertOpt

type ConvertOpt struct {
	Target       string
	MetaResolver llb.ImageMetaResolver
	BuildArgs    map[string]string
	Labels       map[string]string
	SessionID    string
	BuildContext *llb.State
	Excludes     []string
	// IgnoreCache contains names of the stages that should not use build cache.
	// Empty slice means ignore cache for all stages. Nil doesn't disable cache.
	IgnoreCache []string
	// CacheIDNamespace scopes the IDs for different cache mounts
	CacheIDNamespace string
	ImageResolveMode llb.ResolveMode
	TargetPlatform   *ocispecs.Platform
	BuildPlatforms   []ocispecs.Platform
	PrefixPlatform   bool
	ExtraHosts       []llb.HostIP
	ShmSize          int64
	Ulimit           []pb.Ulimit
	CgroupParent     string
	ForceNetMode     pb.NetMode
	LLBCaps          *apicaps.CapSet
	ContextLocalName string
	SourceMap        *llb.SourceMap
	Hostname         string
	SourceDateEpoch  *time.Time
	Warn             func(short, url string, detail [][]byte, location *parser.Range)
	ContextByName    func(ctx context.Context, name, resolveMode string, p *ocispecs.Platform) (*llb.State, *Image, error)
}

type Image

type Image image.Image

Image is the JSON structure which describes some basic information about the image. This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.

type SBOMTargets

type SBOMTargets struct {
	Core   llb.State
	Extras map[string]llb.State

	IgnoreCache bool
}

Source Files

convert.go convert_noaddchecksum.go convert_noaddgit.go convert_norunsecurity.go convert_runmount.go convert_runnetwork.go convert_secrets.go convert_ssh.go defaultshell.go image.go outline.go platform.go

Version
v0.11.1
Published
Jan 17, 2023
Platform
js/wasm
Imports
36 packages
Last checked
12 hours ago

Tools for package owners.