package bake

import "github.com/docker/buildx/bake"

Index

Functions

func ReadTargets

func ReadTargets(ctx context.Context, files, targets, overrides []string) (map[string]Target, error)

func TargetsToBuildOpt

func TargetsToBuildOpt(m map[string]Target) (map[string]build.Options, error)

Types

type Config

type Config struct {
	Group  map[string]Group
	Target map[string]Target
}

func ParseCompose

func ParseCompose(dt []byte) (*Config, error)

func ParseFile

func ParseFile(fn string) (*Config, error)

func ParseHCL

func ParseHCL(dt []byte) (*Config, error)

func (Config) ResolveGroup

func (c Config) ResolveGroup(name string) []string

func (Config) ResolveTarget

func (c Config) ResolveTarget(name string) (*Target, error)

type Group

type Group struct {
	Targets []string
}

type Target

type Target struct {
	Inherits   []string          `json:"inherits,omitempty" hcl:"inherits,omitempty"`
	Context    *string           `json:"context,omitempty" hcl:"context,omitempty"`
	Dockerfile *string           `json:"dockerfile,omitempty" hcl:"dockerfile,omitempty"`
	Args       map[string]string `json:"args,omitempty" hcl:"args,omitempty"`
	Labels     map[string]string `json:"labels,omitempty" hcl:"labels,omitempty"`
	Tags       []string          `json:"tags,omitempty" hcl:"tags,omitempty"`
	CacheFrom  []string          `json:"cache-from,omitempty"  hcl:"cache-from,omitempty"`
	CacheTo    []string          `json:"cache-to,omitempty"  hcl:"cache-to,omitempty"`
	Target     *string           `json:"target,omitempty" hcl:"target,omitempty"`
	Secrets    []string          `json:"secret,omitempty" hcl:"secret,omitempty"`
	SSH        []string          `json:"ssh,omitempty" hcl:"ssh,omitempty"`
	Platforms  []string          `json:"platforms,omitempty" hcl:"platforms,omitempty"`
	Outputs    []string          `json:"output,omitempty" hcl:"output,omitempty"`
}

Source Files

bake.go compose.go hcl.go

Version
v0.2.1
Published
May 24, 2019
Platform
js/wasm
Imports
13 packages
Last checked
7 hours ago

Tools for package owners.