Documentation
¶
Index ¶
- Constants
- type AddStep
- type BuildStep
- func NewCmdStep(args string, cmd []string, commit bool) BuildStep
- func NewDockerfileStep(ctx *context.BuildContext, d dockerfile.Directive, seed string) (BuildStep, error)
- func NewEntrypointStep(args string, entrypoint []string, commit bool) BuildStep
- func NewEnvStep(args string, envs map[string]string, commit bool) BuildStep
- func NewExposeStep(args string, ports []string, commit bool) BuildStep
- func NewLabelStep(args string, labels map[string]string, commit bool) BuildStep
- func NewMaintainerStep(args string, author string, commit bool) BuildStep
- func NewUserStep(args, user string, commit bool) BuildStep
- func NewVolumeStep(args string, volumes []string, commit bool) BuildStep
- func NewWorkdirStep(args string, workingDir string, commit bool) BuildStep
- type CmdStep
- func (s CmdStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s CmdStep) CacheID() string
- func (s CmdStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s CmdStep) ContextDirs() (string, []string)
- func (s CmdStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *CmdStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s CmdStep) HasCommit() bool
- func (s CmdStep) RequireOnDisk() bool
- func (s CmdStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s CmdStep) String() string
- type CopyStep
- func CopyStepFixture(args, fromStage string, srcs []string, dst string, commit bool) *CopyStep
- func CopyStepFixtureNoChown(args, fromStage string, srcs []string, dst string, commit bool) *CopyStep
- func NewCopyStep(args, chown, fromStage string, fromPaths []string, toPath string, commit bool) (*CopyStep, error)
- type Directive
- type EntrypointStep
- func (s EntrypointStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s EntrypointStep) CacheID() string
- func (s EntrypointStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s EntrypointStep) ContextDirs() (string, []string)
- func (s EntrypointStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *EntrypointStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s EntrypointStep) HasCommit() bool
- func (s EntrypointStep) RequireOnDisk() bool
- func (s EntrypointStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s EntrypointStep) String() string
- type EnvStep
- func (s EnvStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s EnvStep) CacheID() string
- func (s EnvStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s EnvStep) ContextDirs() (string, []string)
- func (s EnvStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *EnvStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s EnvStep) HasCommit() bool
- func (s EnvStep) RequireOnDisk() bool
- func (s EnvStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s EnvStep) String() string
- type ExposeStep
- func (s ExposeStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s ExposeStep) CacheID() string
- func (s ExposeStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s ExposeStep) ContextDirs() (string, []string)
- func (s ExposeStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *ExposeStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s ExposeStep) HasCommit() bool
- func (s ExposeStep) RequireOnDisk() bool
- func (s ExposeStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s ExposeStep) String() string
- type FromStep
- func (s FromStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s FromStep) CacheID() string
- func (s *FromStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s FromStep) ContextDirs() (string, []string)
- func (s *FromStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *FromStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s *FromStep) GetAlias() string
- func (s *FromStep) GetImage() string
- func (s FromStep) HasCommit() bool
- func (s FromStep) RequireOnDisk() bool
- func (s *FromStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s FromStep) String() string
- type LabelStep
- func (s LabelStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s LabelStep) CacheID() string
- func (s LabelStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s LabelStep) ContextDirs() (string, []string)
- func (s LabelStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *LabelStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s LabelStep) HasCommit() bool
- func (s LabelStep) RequireOnDisk() bool
- func (s LabelStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s LabelStep) String() string
- type MaintainerStep
- func (s MaintainerStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s MaintainerStep) CacheID() string
- func (s MaintainerStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s MaintainerStep) ContextDirs() (string, []string)
- func (s MaintainerStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *MaintainerStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s MaintainerStep) HasCommit() bool
- func (s MaintainerStep) RequireOnDisk() bool
- func (s MaintainerStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s MaintainerStep) String() string
- type RunStep
- func (s RunStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s RunStep) CacheID() string
- func (s RunStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s RunStep) ContextDirs() (string, []string)
- func (s *RunStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s RunStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s RunStep) HasCommit() bool
- func (s *RunStep) RequireOnDisk() bool
- func (s RunStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s RunStep) String() string
- type UserStep
- func (s UserStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s UserStep) CacheID() string
- func (s UserStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s UserStep) ContextDirs() (string, []string)
- func (s UserStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *UserStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s UserStep) HasCommit() bool
- func (s UserStep) RequireOnDisk() bool
- func (s UserStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s UserStep) String() string
- type VolumeStep
- func (s VolumeStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s VolumeStep) CacheID() string
- func (s VolumeStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s VolumeStep) ContextDirs() (string, []string)
- func (s VolumeStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *VolumeStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s VolumeStep) HasCommit() bool
- func (s VolumeStep) RequireOnDisk() bool
- func (s VolumeStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s VolumeStep) String() string
- type WorkdirStep
- func (s WorkdirStep) ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s WorkdirStep) CacheID() string
- func (s WorkdirStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s WorkdirStep) ContextDirs() (string, []string)
- func (s WorkdirStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s *WorkdirStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- func (s WorkdirStep) HasCommit() bool
- func (s WorkdirStep) RequireOnDisk() bool
- func (s WorkdirStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s WorkdirStep) String() string
Constants ¶
const ( Add = Directive("ADD") Cmd = Directive("CMD") Copy = Directive("COPY") Entrypoint = Directive("ENTRYPOINT") Env = Directive("ENV") Expose = Directive("EXPOSE") From = Directive("FROM") Label = Directive("LABEL") Maintainer = Directive("MAINTAINER") Run = Directive("RUN") User = Directive("USER") Volume = Directive("VOLUME") Workdir = Directive("WORKDIR") )
Set of all valid directives.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddStep ¶
type AddStep struct {
// contains filtered or unexported fields
}
AddStep is similar to copy, so they depend on a common base.
func AddStepFixture ¶
AddStepFixture returns a AddStep, panicing if it fails, for testing purposes.
func AddStepFixtureNoChown ¶
AddStepFixtureNoChown returns a AddStep, panicing if it fails, for testing purposes.
func NewAddStep ¶
func NewAddStep(args, chown string, fromPaths []string, toPath string, commit bool) (*AddStep, error)
NewAddStep creates a new AddStep
func (AddStep) ContextDirs ¶
ContextDirs returns the stage and directories that a 'COPY --from=<stage>' depends on.
func (AddStep) Execute ¶
func (s AddStep) Execute(ctx *context.BuildContext, modifyFS bool) (err error)
Execute executes the add/copy step. If modifyFS is true, actually performs the on-disk copy.
func (AddStep) RequireOnDisk ¶
func (s AddStep) RequireOnDisk() bool
RequireOnDisk returns true if the add/copy has a chown argument, as we need to read the users file to translate user/group name to uid/gid.
func (AddStep) SetCacheID ¶
func (s AddStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Calculates the ID randomly if copying from another stage, else checksums the file contents.
type BuildStep ¶
type BuildStep interface { String() string // RequireOnDisk returns whether executing this step requires on-disk state. RequireOnDisk() bool // ContextDirs returns directories that this step requires from another stage. ContextDirs() (string, []string) // CacheID returns the step's cache id after it is set using SetCacheID(). CacheID() string // SetCacheID sets the cache ID of the step given a seed value. SetCacheID(ctx *context.BuildContext, seed string) error // ApplyConfig sets up the execution environment using image config from previous step. // This function will not be skipped. ApplyConfig(ctx *context.BuildContext, imageConfig *image.Config) error // Execute executes the step. If modifyFS is true, the command might change the local // file system. Execute(ctx *context.BuildContext, modifyFS bool) error // Commit generates an image layer. Commit(ctx *context.BuildContext) ([]*image.DigestPair, error) // GenerateConfig generates a new image config base on config from previous step. // This function will not be skipped. GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error) // HasCommit returns whether or not a particular commit step has a commit annotation. HasCommit() bool }
BuildStep performs build for one build step.
func NewCmdStep ¶
NewCmdStep returns a BuildStep given ParsedLine.
func NewDockerfileStep ¶
func NewDockerfileStep( ctx *context.BuildContext, d dockerfile.Directive, seed string) (BuildStep, error)
NewDockerfileStep initializes a build step from a dockerfile directive.
func NewEntrypointStep ¶
NewEntrypointStep returns a BuildStep from give build step.
func NewEnvStep ¶
NewEnvStep returns a BuildStep from give build step.
func NewExposeStep ¶
NewExposeStep returns a BuildStep from give build step.
func NewLabelStep ¶
NewLabelStep returns a BuildStep from give build step.
func NewMaintainerStep ¶
NewMaintainerStep returns a BuildStep from give build step.
func NewUserStep ¶
NewUserStep returns a BuildStep from give build step.
func NewVolumeStep ¶
NewVolumeStep returns a BuildStep from give build step.
type CmdStep ¶
type CmdStep struct {
// contains filtered or unexported fields
}
CmdStep implements BuildStep and execute CMD directive There are three forms of command: CMD ["executable","param1","param2"] -> CmdStep.cmds = []string{`["executable","param1","param2"]`} CMD ["param1","param2"] -> CmdStep.cmds = []string{`["param1","param2"]`} CMD command param1 param2 -> CmdStep.cmds = []string{"command", "param1", "param2"}
func (CmdStep) ApplyConfig ¶
func (s CmdStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (CmdStep) CacheID ¶
func (s CmdStep) CacheID() string
CacheID returns the cache ID of the step.
func (CmdStep) Commit ¶
func (s CmdStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (CmdStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (CmdStep) Execute ¶
func (s CmdStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*CmdStep) GenerateConfig ¶
func (s *CmdStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (CmdStep) HasCommit ¶
func (s CmdStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (CmdStep) RequireOnDisk ¶
func (s CmdStep) RequireOnDisk() bool
func (CmdStep) SetCacheID ¶
func (s CmdStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type CopyStep ¶
type CopyStep struct {
// contains filtered or unexported fields
}
CopyStep is similar to add, so they depend on a common base.
func CopyStepFixture ¶
CopyStepFixture returns a CopyStep, panicing if it fails, for testing purposes.
func CopyStepFixtureNoChown ¶
func CopyStepFixtureNoChown(args, fromStage string, srcs []string, dst string, commit bool) *CopyStep
CopyStepFixtureNoChown returns a CopyStep, panicing if it fails, for testing purposes.
func NewCopyStep ¶
func NewCopyStep(args, chown, fromStage string, fromPaths []string, toPath string, commit bool) (*CopyStep, error)
NewCopyStep creates a new CopyStep.
func (CopyStep) ContextDirs ¶
ContextDirs returns the stage and directories that a 'COPY --from=<stage>' depends on.
func (CopyStep) Execute ¶
func (s CopyStep) Execute(ctx *context.BuildContext, modifyFS bool) (err error)
Execute executes the add/copy step. If modifyFS is true, actually performs the on-disk copy.
func (CopyStep) RequireOnDisk ¶
func (s CopyStep) RequireOnDisk() bool
RequireOnDisk returns true if the add/copy has a chown argument, as we need to read the users file to translate user/group name to uid/gid.
func (CopyStep) SetCacheID ¶
func (s CopyStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Calculates the ID randomly if copying from another stage, else checksums the file contents.
type EntrypointStep ¶
type EntrypointStep struct {
// contains filtered or unexported fields
}
EntrypointStep implements BuildStep and execute ENTRYPOINT directive There are three forms of command: ENTRYPOINT ["executable","param1","param2"] -> EntrypointStep.entrypoint = []string{`["executable","param1","param2"]`} ENTRYPOINT ["param1","param2"] -> EntrypointStep.entrypoint = []string{`["param1","param2"]`} ENTRYPOINT command param1 param2 -> EntrypointStep.entrypoint = []string{"command", "param1", "param2"}
func (EntrypointStep) ApplyConfig ¶
func (s EntrypointStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (EntrypointStep) CacheID ¶
func (s EntrypointStep) CacheID() string
CacheID returns the cache ID of the step.
func (EntrypointStep) Commit ¶
func (s EntrypointStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (EntrypointStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (EntrypointStep) Execute ¶
func (s EntrypointStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*EntrypointStep) GenerateConfig ¶
func (s *EntrypointStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (EntrypointStep) HasCommit ¶
func (s EntrypointStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (EntrypointStep) RequireOnDisk ¶
func (s EntrypointStep) RequireOnDisk() bool
func (EntrypointStep) SetCacheID ¶
func (s EntrypointStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type EnvStep ¶
type EnvStep struct {
// contains filtered or unexported fields
}
EnvStep implements BuildStep and execute ENV directive
func (EnvStep) ApplyConfig ¶
func (s EnvStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (EnvStep) CacheID ¶
func (s EnvStep) CacheID() string
CacheID returns the cache ID of the step.
func (EnvStep) Commit ¶
func (s EnvStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (EnvStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (EnvStep) Execute ¶
func (s EnvStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*EnvStep) GenerateConfig ¶
func (s *EnvStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (EnvStep) HasCommit ¶
func (s EnvStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (EnvStep) RequireOnDisk ¶
func (s EnvStep) RequireOnDisk() bool
func (EnvStep) SetCacheID ¶
func (s EnvStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type ExposeStep ¶
type ExposeStep struct {
// contains filtered or unexported fields
}
ExposeStep implements BuildStep and execute EXPOSE directive
func (ExposeStep) ApplyConfig ¶
func (s ExposeStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (ExposeStep) CacheID ¶
func (s ExposeStep) CacheID() string
CacheID returns the cache ID of the step.
func (ExposeStep) Commit ¶
func (s ExposeStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (ExposeStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (ExposeStep) Execute ¶
func (s ExposeStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*ExposeStep) GenerateConfig ¶
func (s *ExposeStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (ExposeStep) HasCommit ¶
func (s ExposeStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (ExposeStep) RequireOnDisk ¶
func (s ExposeStep) RequireOnDisk() bool
func (ExposeStep) SetCacheID ¶
func (s ExposeStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type FromStep ¶
type FromStep struct {
// contains filtered or unexported fields
}
FromStep implements BuildStep and execute FROM directive
func FromStepFixture ¶
FromStepFixture returns a FromStep, panicing if it fails, for testing purposes.
func NewFromStep ¶
NewFromStep returns a BuildStep from give build step.
func (FromStep) ApplyConfig ¶
func (s FromStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (FromStep) CacheID ¶
func (s FromStep) CacheID() string
CacheID returns the cache ID of the step.
func (*FromStep) Commit ¶
func (s *FromStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (FromStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (*FromStep) Execute ¶
func (s *FromStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute updates the memFS with the FROM image. If modifyFS is true, also unpacks it to the local filesystem.
func (*FromStep) GenerateConfig ¶
func (s *FromStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (FromStep) HasCommit ¶
func (s FromStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (FromStep) RequireOnDisk ¶
func (s FromStep) RequireOnDisk() bool
func (*FromStep) SetCacheID ¶
func (s *FromStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cacheID of the step using the name of the base image. TODO: Use the sha of that image instead of the image name itself.
type LabelStep ¶
type LabelStep struct {
// contains filtered or unexported fields
}
LabelStep implements BuildStep and execute LABEL directive
func (LabelStep) ApplyConfig ¶
func (s LabelStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (LabelStep) CacheID ¶
func (s LabelStep) CacheID() string
CacheID returns the cache ID of the step.
func (LabelStep) Commit ¶
func (s LabelStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (LabelStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (LabelStep) Execute ¶
func (s LabelStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*LabelStep) GenerateConfig ¶
func (s *LabelStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (LabelStep) HasCommit ¶
func (s LabelStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (LabelStep) RequireOnDisk ¶
func (s LabelStep) RequireOnDisk() bool
func (LabelStep) SetCacheID ¶
func (s LabelStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type MaintainerStep ¶
type MaintainerStep struct { Author string // contains filtered or unexported fields }
MaintainerStep implements BuildStep and execute MAINTAINER directive
func (MaintainerStep) ApplyConfig ¶
func (s MaintainerStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (MaintainerStep) CacheID ¶
func (s MaintainerStep) CacheID() string
CacheID returns the cache ID of the step.
func (MaintainerStep) Commit ¶
func (s MaintainerStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (MaintainerStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (MaintainerStep) Execute ¶
func (s MaintainerStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*MaintainerStep) GenerateConfig ¶
func (s *MaintainerStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (MaintainerStep) HasCommit ¶
func (s MaintainerStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (MaintainerStep) RequireOnDisk ¶
func (s MaintainerStep) RequireOnDisk() bool
func (MaintainerStep) SetCacheID ¶
func (s MaintainerStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type RunStep ¶
type RunStep struct {
// contains filtered or unexported fields
}
RunStep implements BuildStep and execute RUN directive
func NewRunStep ¶
NewRunStep returns a BuildStep from give build step.
func (RunStep) ApplyConfig ¶
func (s RunStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (RunStep) CacheID ¶
func (s RunStep) CacheID() string
CacheID returns the cache ID of the step.
func (RunStep) Commit ¶
func (s RunStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (RunStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (*RunStep) Execute ¶
func (s *RunStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. It shells out to run the specified command, which might change local file system.
func (RunStep) GenerateConfig ¶
func (s RunStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step. Default implementation makes a copy of given image config.
func (RunStep) HasCommit ¶
func (s RunStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (*RunStep) RequireOnDisk ¶
RequireOnDisk always returns true, as run steps always require the stage's layers to be present on disk.
func (RunStep) SetCacheID ¶
func (s RunStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type UserStep ¶
type UserStep struct {
// contains filtered or unexported fields
}
UserStep implements BuildStep and execute USER directive
func (UserStep) ApplyConfig ¶
func (s UserStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (UserStep) CacheID ¶
func (s UserStep) CacheID() string
CacheID returns the cache ID of the step.
func (UserStep) Commit ¶
func (s UserStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (UserStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (UserStep) Execute ¶
func (s UserStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*UserStep) GenerateConfig ¶
func (s *UserStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (UserStep) HasCommit ¶
func (s UserStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (UserStep) RequireOnDisk ¶
func (s UserStep) RequireOnDisk() bool
func (UserStep) SetCacheID ¶
func (s UserStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type VolumeStep ¶
type VolumeStep struct {
// contains filtered or unexported fields
}
VolumeStep implements BuildStep and execute VOLUME directive
func (VolumeStep) ApplyConfig ¶
func (s VolumeStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (VolumeStep) CacheID ¶
func (s VolumeStep) CacheID() string
CacheID returns the cache ID of the step.
func (VolumeStep) Commit ¶
func (s VolumeStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (VolumeStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (VolumeStep) Execute ¶
func (s VolumeStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*VolumeStep) GenerateConfig ¶
func (s *VolumeStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (VolumeStep) HasCommit ¶
func (s VolumeStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (VolumeStep) RequireOnDisk ¶
func (s VolumeStep) RequireOnDisk() bool
func (VolumeStep) SetCacheID ¶
func (s VolumeStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.
type WorkdirStep ¶
type WorkdirStep struct {
// contains filtered or unexported fields
}
WorkdirStep implements BuildStep and execute WORKDIR directive
func (WorkdirStep) ApplyConfig ¶
func (s WorkdirStep) ApplyConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyConfig sets up the execution environment using image config from previous step. This function will not be skipped.
func (WorkdirStep) CacheID ¶
func (s WorkdirStep) CacheID() string
CacheID returns the cache ID of the step.
func (WorkdirStep) Commit ¶
func (s WorkdirStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (WorkdirStep) ContextDirs ¶
ContextDirs returns directories that this step requires from another stage.
func (WorkdirStep) Execute ¶
func (s WorkdirStep) Execute(ctx *context.BuildContext, modifyFS bool) error
Execute executes the step. If modifyFS is true, the command might change the local file system. Default implementation is noop.
func (*WorkdirStep) GenerateConfig ¶
func (s *WorkdirStep) GenerateConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
GenerateConfig generates a new image config base on config from previous step.
func (WorkdirStep) HasCommit ¶
func (s WorkdirStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (WorkdirStep) RequireOnDisk ¶
func (s WorkdirStep) RequireOnDisk() bool
func (WorkdirStep) SetCacheID ¶
func (s WorkdirStep) SetCacheID(ctx *context.BuildContext, seed string) error
SetCacheID sets the cache ID of the step given a seed SHA256 value. Special steps like FROM, ADD, COPY have their own implementations.