Documentation ¶
Index ¶
- Variables
- type AST
- type Dockerfile
- func (d Dockerfile) AddAll() Dockerfile
- func (d Dockerfile) Append(df Dockerfile) Dockerfile
- func (d Dockerfile) BUGGY_DeriveSyncs(context string) ([]model.Sync, error)
- func (d Dockerfile) Empty() bool
- func (d Dockerfile) Entrypoint(cmd model.Cmd) Dockerfile
- func (d Dockerfile) FindImages() ([]reference.Named, error)
- func (d Dockerfile) Join(s string) Dockerfile
- func (d Dockerfile) RmPaths(pathsToRm []string) Dockerfile
- func (d Dockerfile) Run(cmd model.Cmd) Dockerfile
- func (d Dockerfile) SplitIntoBaseDockerfile() (Dockerfile, Dockerfile, bool)
- func (d Dockerfile) String() string
- func (d Dockerfile) ValidateBaseDockerfile() error
- func (d Dockerfile) WithLabel(label Label, val LabelValue) Dockerfile
- type Label
- type LabelValue
- type Labels
Constants ¶
This section is empty.
Variables ¶
var ErrAddInDockerfile = fmt.Errorf("base Dockerfile contains an ADD/COPY, " +
"which is not currently supported -- move this to an add() call in your Tiltfile")
Functions ¶
This section is empty.
Types ¶
type AST ¶ added in v0.7.11
type AST struct {
// contains filtered or unexported fields
}
func ParseAST ¶ added in v0.7.11
func ParseAST(df Dockerfile) (AST, error)
func (AST) InjectImageDigest ¶ added in v0.7.11
func (a AST) InjectImageDigest(selector container.RefSelector, ref reference.NamedTagged) (bool, error)
func (AST) Print ¶ added in v0.7.11
func (a AST) Print() (Dockerfile, error)
type Dockerfile ¶
type Dockerfile string
func FromExisting ¶
func FromExisting(existing reference.NamedTagged) Dockerfile
DockerfileFromExisting creates a new Dockerfile that uses the supplied image as its base image with a FROM statement. This is necessary for iterative Docker builds.
func InjectImageDigest ¶ added in v0.7.11
func InjectImageDigest(df Dockerfile, selector container.RefSelector, ref reference.NamedTagged) (Dockerfile, bool, error)
func (Dockerfile) AddAll ¶
func (d Dockerfile) AddAll() Dockerfile
func (Dockerfile) Append ¶
func (d Dockerfile) Append(df Dockerfile) Dockerfile
func (Dockerfile) BUGGY_DeriveSyncs ¶ added in v0.7.11
func (d Dockerfile) BUGGY_DeriveSyncs(context string) ([]model.Sync, error)
DeriveSyncs finds ADD statements in a Dockerfile and turns them into Tilt model.Sync's. Relative paths in an ADD statement are relative to the build context (passed as an arg) and will appear in the Sync as an abs path.
TODO(nick): This code has several bugs and needs to be revisited. In particular, it doesn't properly handle 1) multi-stage builds 2) ADD/COPY flags 3) workdirs 4) relative dirs vs absolute dirs
Should probably be reworked to only return local paths, as part of a rethink of slimming down the docker build context in a way that's not docker-compose specific.
func (Dockerfile) Empty ¶ added in v0.10.15
func (d Dockerfile) Empty() bool
func (Dockerfile) Entrypoint ¶
func (d Dockerfile) Entrypoint(cmd model.Cmd) Dockerfile
func (Dockerfile) FindImages ¶ added in v0.7.11
func (d Dockerfile) FindImages() ([]reference.Named, error)
Find all images referenced in this dockerfile.
func (Dockerfile) Join ¶
func (d Dockerfile) Join(s string) Dockerfile
func (Dockerfile) RmPaths ¶
func (d Dockerfile) RmPaths(pathsToRm []string) Dockerfile
func (Dockerfile) Run ¶
func (d Dockerfile) Run(cmd model.Cmd) Dockerfile
func (Dockerfile) SplitIntoBaseDockerfile ¶
func (d Dockerfile) SplitIntoBaseDockerfile() (Dockerfile, Dockerfile, bool)
If possible, split this dockerfile into two parts: a base dockerfile (without any adds/copys) and a "iterative" dockerfile. Useful for constructing the directory cache. Returns false if we can't split it.
func (Dockerfile) String ¶
func (d Dockerfile) String() string
func (Dockerfile) ValidateBaseDockerfile ¶
func (d Dockerfile) ValidateBaseDockerfile() error
func (Dockerfile) WithLabel ¶
func (d Dockerfile) WithLabel(label Label, val LabelValue) Dockerfile
type LabelValue ¶
type LabelValue string
type Labels ¶
type Labels map[Label]LabelValue