Documentation ¶
Index ¶
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
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 DockerContext *string `hcl:"context,attr"` BuildArgs *map[string]string `hcl:"build_args,attr"` Tags *[]string `hcl:"tags,attr"` Output *string `hcl:"output,attr"` Progress *string `hcl:"progress,attr"` }
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 DockerContext hcl.Expression `hcl:"context,attr"` BuildArgs hcl.Expression `hcl:"build_args,attr"` Tags hcl.Expression `hcl:"tags,attr"` Output hcl.Expression `hcl:"output,attr"` Progress hcl.Expression `hcl:"progress,attr"` }
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 iamge 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