Documentation ¶
Index ¶
- func GenerateSourceFilesDigest(root, src string) (digest.Digest, error)
- func GetBaseLayersPath(layers []v1.Layer) (res []string)
- func ParseCopyLayerContent(layerValue string) (src, dst string)
- type CmdInstruction
- type CopyInstruction
- type ExecContext
- type InstructionContext
- type Interface
- type MountTarget
- type Out
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseLayersPath ¶
GetBaseLayersPath used in build stage, where the image still has from layer
func ParseCopyLayerContent ¶ added in v0.7.0
Types ¶
type CmdInstruction ¶
type CmdInstruction struct {
// contains filtered or unexported fields
}
func NewCmdInstruction ¶
func NewCmdInstruction(ctx InstructionContext) (*CmdInstruction, error)
func (CmdInstruction) Exec ¶
func (c CmdInstruction) Exec(execContext ExecContext) (out Out, err error)
type CopyInstruction ¶
type CopyInstruction struct {
// contains filtered or unexported fields
}
func NewCopyInstruction ¶
func NewCopyInstruction(ctx InstructionContext) (*CopyInstruction, error)
func (CopyInstruction) Exec ¶
func (c CopyInstruction) Exec(execContext ExecContext) (out Out, err error)
func (CopyInstruction) SetCacheID ¶
func (c CopyInstruction) SetCacheID(layerID digest.Digest, cID string) error
SetCacheID This function only has meaning for copy layers
type ExecContext ¶
type ExecContext struct { BuildContext string BuildType string BuildArgs map[string]string //cache flag,will change for each layer ctx ContinueCache bool //cache chain to hit,will change for each layer ctx ParentID cache.ChainID //static method to do cache CacheSvc cache.Service Prober image.Prober //used to gen layer LayerStore store.LayerStore }
func NewExecContext ¶
func NewExecContext(buildType, buildContext string, buildArgs map[string]string, imageService image.Service, layerStore store.LayerStore) ExecContext
func NewExecContextWithoutCache ¶
func NewExecContextWithoutCache(buildType, buildContext string, buildArgs map[string]string, layerStore store.LayerStore) ExecContext
type InstructionContext ¶
type Interface ¶
type Interface interface {
Exec(ctx ExecContext) (out Out, err error)
}
Interface Different instructions have different behavioral logic each build instruction needs handle context,store context, try cache, init hook via content,and gen layer id.
func NewInstruction ¶
func NewInstruction(ic InstructionContext) (Interface, error)
type MountTarget ¶
type MountTarget struct { TempTarget string TempUpper string //driver.Mount will reverse lowers,so here we keep the order same with the image layer. LowLayers []string // contains filtered or unexported fields }
func NewMountTarget ¶
func NewMountTarget(target, upper string, lowLayers []string) (*MountTarget, error)
NewMountTarget will create temp dir if target or upper is nil. it is convenient for use in build stage
func (MountTarget) CleanUp ¶
func (m MountTarget) CleanUp()
func (MountTarget) GetLowLayers ¶
func (m MountTarget) GetLowLayers() []string
func (MountTarget) GetMountTarget ¶
func (m MountTarget) GetMountTarget() string
func (MountTarget) GetMountUpper ¶
func (m MountTarget) GetMountUpper() string
func (MountTarget) TempMount ¶
func (m MountTarget) TempMount() error
func (MountTarget) TempUMount ¶
func (m MountTarget) TempUMount() error
Click to show internal directories.
Click to hide internal directories.