Documentation
¶
Index ¶
- func EnsureFinalStageName(dockerfileContent, defaultLastStageName string) (string, string, error)
- func FormatNode(node *parser.Node) string
- func FormatNodes(nodes []*parser.Node) string
- func RemoveSyntaxVersion(dockerfileContent string) string
- func ReplaceInDockerfile(dockerfileContent string, node *parser.Node) string
- type BaseStage
- type Dockerfile
- type Preamble
- type Stage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureFinalStageName ¶ added in v0.8.8
func FormatNode ¶ added in v0.8.8
func FormatNodes ¶ added in v0.8.8
func RemoveSyntaxVersion ¶
Types ¶
type BaseStage ¶
type BaseStage struct {
Image string
Target string
Envs []instructions.KeyValuePair
Args []instructions.KeyValuePairOptional
Instructions []*parser.Node
}
type Dockerfile ¶
type Dockerfile struct {
Raw string
Directives []*parser.Directive
Preamble *Preamble
Syntax string // https://docs.docker.com/build/concepts/dockerfile/#dockerfile-syntax
Stages []*Stage
StagesByTarget map[string]*Stage
}
func Parse ¶
func Parse(dockerfileContent string) (*Dockerfile, error)
func (*Dockerfile) BuildContextFiles ¶
func (d *Dockerfile) BuildContextFiles() []string
func (*Dockerfile) Dump ¶
func (d *Dockerfile) Dump() string
func (*Dockerfile) FindBaseImage ¶
func (d *Dockerfile) FindBaseImage(buildArgs map[string]string, target string) string
func (*Dockerfile) FindUserStatement ¶
func (d *Dockerfile) FindUserStatement(buildArgs, baseImageEnv map[string]string, target string) string
type Stage ¶
type Stage struct {
BaseStage
Users []instructions.KeyValuePair
}
Click to show internal directories.
Click to hide internal directories.