Documentation ¶
Overview ¶
Package docker implements a compiler for turning Blubber configuration into a valid single- or multi-stage Dockerfile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
Compile takes a parsed config.Config and a configured variant name and returns the bytes of a resulting Dockerfile. In the case where artifacts are defined or the shorthand "copies" configured is set, a multi-stage Dockerfile will be returned.
Types ¶
type Instruction ¶ added in v0.2.0
type Instruction interface {
Compile() string
}
Instruction defines an interface for instruction compilation.
func NewInstruction ¶ added in v0.2.0
func NewInstruction(bi build.Instruction) (Instruction, error)
NewInstruction takes a general internal build.Instruction and returns a corresponding compilable Docker specific instruction. The given internal instruction is partially compiled at this point by calling Compile() which applies its own logic for escaping arguments, etc.