package bake
import "github.com/docker/buildx/bake"
Index ¶
- func IsRemoteURL(url string) bool
- func ParseHCLFile(dt []byte, fn string) (*hcl.File, bool, error)
- func ReadRemoteFiles(ctx context.Context, dis []build.DriverInfo, url string, names []string, pw progress.Writer) ([]File, *Input, error)
- func ReadTargets(ctx context.Context, files []File, targets, overrides []string, defaults map[string]string) (map[string]*Target, error)
- func TargetsToBuildOpt(m map[string]*Target, inp *Input) (map[string]build.Options, error)
- type Config
- func ParseCompose(dt []byte) (*Config, error)
- func ParseComposeFile(dt []byte, fn string) (*Config, bool, error)
- func ParseFile(dt []byte, fn string) (*Config, error)
- func ParseFiles(files []File, defaults map[string]string) (_ *Config, err error)
- func (c Config) ResolveGroup(name string) []string
- func (c Config) ResolveTarget(name string, overrides map[string]*Target) (*Target, error)
- type File
- type Group
- type Input
- type Target
Functions ¶
func IsRemoteURL ¶
func ParseHCLFile ¶
func ReadRemoteFiles ¶
func ReadRemoteFiles(ctx context.Context, dis []build.DriverInfo, url string, names []string, pw progress.Writer) ([]File, *Input, error)
func ReadTargets ¶
func ReadTargets(ctx context.Context, files []File, targets, overrides []string, defaults map[string]string) (map[string]*Target, error)
func TargetsToBuildOpt ¶
Types ¶
type Config ¶
type Config struct { Groups []*Group `json:"group" hcl:"group,block"` Targets []*Target `json:"target" hcl:"target,block"` }
func ParseCompose ¶
func ParseComposeFile ¶
func ParseFile ¶
func ParseFiles ¶
func (Config) ResolveGroup ¶
func (Config) ResolveTarget ¶
type File ¶
func ReadLocalFiles ¶
type Group ¶
type Group struct { Name string `json:"-" hcl:"name,label"` Targets []string `json:"targets" hcl:"targets"` }
type Input ¶
type Target ¶
type Target struct { Name string `json:"-" hcl:"name,label"` // Inherits is the only field that cannot be overridden with --set Inherits []string `json:"inherits,omitempty" hcl:"inherits,optional"` Context *string `json:"context,omitempty" hcl:"context,optional"` Dockerfile *string `json:"dockerfile,omitempty" hcl:"dockerfile,optional"` DockerfileInline *string `json:"dockerfile-inline,omitempty" hcl:"dockerfile-inline,optional"` Args map[string]string `json:"args,omitempty" hcl:"args,optional"` Labels map[string]string `json:"labels,omitempty" hcl:"labels,optional"` Tags []string `json:"tags,omitempty" hcl:"tags,optional"` CacheFrom []string `json:"cache-from,omitempty" hcl:"cache-from,optional"` CacheTo []string `json:"cache-to,omitempty" hcl:"cache-to,optional"` Target *string `json:"target,omitempty" hcl:"target,optional"` Secrets []string `json:"secret,omitempty" hcl:"secret,optional"` SSH []string `json:"ssh,omitempty" hcl:"ssh,optional"` Platforms []string `json:"platforms,omitempty" hcl:"platforms,optional"` Outputs []string `json:"output,omitempty" hcl:"output,optional"` Pull *bool `json:"pull,omitempty" hcl:"pull,optional"` NoCache *bool `json:"no-cache,omitempty" hcl:"no-cache,optional"` }
func (*Target) Merge ¶
Source Files ¶
bake.go compose.go hcl.go remote.go
Directories ¶
Path | Synopsis |
---|---|
bake/hclparser |
- Version
- v0.6.3
- Published
- Aug 28, 2021
- Platform
- js/wasm
- Imports
- 29 packages
- Last checked
- 8 hours ago –
Tools for package owners.