Documentation ¶
Index ¶
- Constants
- Variables
- type ComputedAttrs
- type Target
- func (t Target) Attributes() map[string]cty.Value
- func (t Target) Build() error
- func (t Target) CheckLocalBuildCache() (bool, error)
- func (t Target) CheckRemoteCache() (bool, error)
- func (t Target) ComputedAttrs() *ComputedAttrs
- func (t Target) PreBuild() error
- func (t Target) PullRemoteCache() error
- func (t Target) PushRemoteCache() error
- func (t Target) URL(tag string) string
- func (t Target) URLsFromTags() []string
Constants ¶
const ( ARK_LLB_FILE = "__ark.llb" ARK_CONTEXT_FILE = "context.tar.gz" )
Variables ¶
var (
BUILDKIT_INLINE_CACHE = "1"
)
Functions ¶
This section is empty.
Types ¶
type ComputedAttrs ¶
type ComputedAttrs struct { Repo string `hcl:"repo,attr"` Dockerfile string `hcl:"dockerfile,attr"` // Has to be relative to the repo/workspace root BuildArgs map[string]*string `hcl:"build_args,optional"` Target string `hcl:"target,optional"` Output string `hcl:"output,optional"` DumpContext bool `hcl:"dump_context,optional"` Tags []string `hcl:"tags,optional"` CacheFrom []string `hcl:"cache_from,optional"` CacheInline bool `hcl:"cache_inline,optional"` Secrets map[string]string `hcl:"secrets,optional"` // formatted as secretID: vaultPath DisableEntrypointInjection bool `hcl:"disable_entrypoint_injection,optional"` }
ComputedAttrs used to store the computed attributes of a docker_image target
type Target ¶
type Target struct { *base.RawTarget `json:"-"` Repo hcl.Expression `hcl:"repo,attr"` Dockerfile hcl.Expression `hcl:"dockerfile,attr"` // Has to be relative to the repo/workspace root BuildArgs hcl.Expression `hcl:"build_args,optional"` Target hcl.Expression `hcl:"target,optional"` Tags hcl.Expression `hcl:"tags,attr"` Output hcl.Expression `hcl:"output,attr"` DumpContext hcl.Expression `hcl:"dump_context,attr"` CacheInline hcl.Expression `hcl:"cache_inline,optional"` CacheFrom hcl.Expression `hcl:"cache_from,optional"` Secrets hcl.Expression `hcl:"secrets,optional"` DisableEntrypointInjection hcl.Expression `hcl:"disable_entrypoint_injection,optional"` }
Target defines the required and optional attributes for defining a Docker Image Build
func (Target) Attributes ¶
Attributes return combined rawTarget.Attributes with typedTarget.Attributes.
func (Target) Build ¶
Build constructs a Docker image from the information provided in the docker_image target
func (Target) CheckLocalBuildCache ¶
CheckLocalBuildCache loads the build cache state and verifies that the hashes match
func (Target) CheckRemoteCache ¶
CheckRemoteCache determines whether a docker image for a given target exists in a remote repository
func (Target) ComputedAttrs ¶
func (t Target) ComputedAttrs() *ComputedAttrs
ComputedAttrs returns a pointer to computed attributes from the state store. If attributes are not in the state store it will create a new pointer and insert it into the state store.
func (Target) PullRemoteCache ¶
PullRemoteCache pulls a docker image from a remote repository that matches a target's state hash
func (Target) PushRemoteCache ¶
PushRemoteCache pushes a state artifact to remote storage and pushes a docker image to a remote repository
func (Target) URLsFromTags ¶
URLsFromTags creates a slice of image URLs