Documentation
¶
Index ¶
- Constants
- type AddStep
- type ArgStep
- func (s ArgStep) ApplyCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s ArgStep) CacheID() string
- func (s ArgStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s ArgStep) ContextDirs() (string, []string)
- func (s ArgStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s ArgStep) HasCommit() bool
- func (s ArgStep) RequireOnDisk() bool
- func (s ArgStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s ArgStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s ArgStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s ArgStep) String() string
- func (s *ArgStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type BuildStep
- func NewArgStep(args string, name string, resolvedVal *string, commit bool) 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 NewHealthcheckStep(args string, interval, timeout, startPeriod time.Duration, retries int, ...) (BuildStep, error)
- func NewLabelStep(args string, labels map[string]string, commit bool) BuildStep
- func NewMaintainerStep(args string, author string, commit bool) BuildStep
- func NewStopsignalStep(args string, signal int, 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) ApplyCtxAndConfig(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) HasCommit() bool
- func (s CmdStep) RequireOnDisk() bool
- func (s CmdStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s CmdStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s CmdStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s CmdStep) String() string
- func (s *CmdStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type CopyStep
- func CopyStepFixture(args, fromStage string, srcs []string, dst string, commit, preserveOwner bool) *CopyStep
- func CopyStepFixtureNoChown(args, fromStage string, srcs []string, dst string, commit, preserveOwner bool) *CopyStep
- func NewCopyStep(args, chown, fromStage string, fromPaths []string, toPath string, ...) (*CopyStep, error)
- type Directive
- type EntrypointStep
- func (s EntrypointStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s EntrypointStep) RequireOnDisk() bool
- func (s EntrypointStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s EntrypointStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s EntrypointStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s EntrypointStep) String() string
- func (s *EntrypointStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type EnvStep
- func (s EnvStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s EnvStep) RequireOnDisk() bool
- func (s EnvStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s EnvStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s EnvStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s EnvStep) String() string
- func (s *EnvStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type ExposeStep
- func (s ExposeStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s ExposeStep) RequireOnDisk() bool
- func (s ExposeStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s ExposeStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s ExposeStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s ExposeStep) String() string
- func (s *ExposeStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type FromStep
- func (s FromStep) ApplyCtxAndConfig(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) 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) SetEnvFromContext(ctx *context.BuildContext) error
- func (s FromStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s FromStep) String() string
- func (s *FromStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type HealthcheckStep
- func (s HealthcheckStep) ApplyCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s HealthcheckStep) CacheID() string
- func (s HealthcheckStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s HealthcheckStep) ContextDirs() (string, []string)
- func (s HealthcheckStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s HealthcheckStep) HasCommit() bool
- func (s HealthcheckStep) RequireOnDisk() bool
- func (s HealthcheckStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s HealthcheckStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s HealthcheckStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s HealthcheckStep) String() string
- func (s *HealthcheckStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type LabelStep
- func (s LabelStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s LabelStep) RequireOnDisk() bool
- func (s LabelStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s LabelStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s LabelStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s LabelStep) String() string
- func (s *LabelStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type MaintainerStep
- func (s MaintainerStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s MaintainerStep) RequireOnDisk() bool
- func (s MaintainerStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s MaintainerStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s MaintainerStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s MaintainerStep) String() string
- func (s *MaintainerStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type RunStep
- func (s *RunStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s *RunStep) RequireOnDisk() bool
- func (s RunStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s RunStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s RunStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s RunStep) String() string
- func (s RunStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type StopsignalStep
- func (s StopsignalStep) ApplyCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s StopsignalStep) CacheID() string
- func (s StopsignalStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
- func (s StopsignalStep) ContextDirs() (string, []string)
- func (s StopsignalStep) Execute(ctx *context.BuildContext, modifyFS bool) error
- func (s StopsignalStep) HasCommit() bool
- func (s StopsignalStep) RequireOnDisk() bool
- func (s StopsignalStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s StopsignalStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s StopsignalStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s StopsignalStep) String() string
- func (s *StopsignalStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type UserStep
- func (s UserStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s UserStep) RequireOnDisk() bool
- func (s UserStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s UserStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s UserStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s UserStep) String() string
- func (s *UserStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type VolumeStep
- func (s VolumeStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s VolumeStep) RequireOnDisk() bool
- func (s VolumeStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s VolumeStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s VolumeStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s VolumeStep) String() string
- func (s *VolumeStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
- type WorkdirStep
- func (s WorkdirStep) ApplyCtxAndConfig(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) HasCommit() bool
- func (s WorkdirStep) RequireOnDisk() bool
- func (s WorkdirStep) SetCacheID(ctx *context.BuildContext, seed string) error
- func (s WorkdirStep) SetEnvFromContext(ctx *context.BuildContext) error
- func (s WorkdirStep) SetWorkingDir(ctx *context.BuildContext, imageConfig *image.Config) error
- func (s WorkdirStep) String() string
- func (s *WorkdirStep) UpdateCtxAndConfig(ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
Constants ¶
const ( Add = Directive("ADD") Arg = Directive("ARG") Cmd = Directive("CMD") Copy = Directive("COPY") Entrypoint = Directive("ENTRYPOINT") Env = Directive("ENV") Expose = Directive("EXPOSE") From = Directive("FROM") Healthcheck = Directive("HEALTHCHECK") Label = Directive("LABEL") Maintainer = Directive("MAINTAINER") Run = Directive("RUN") Stopsignal = Directive("STOPSIGNAL") 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 ¶
func AddStepFixtureNoChown(args string, srcs []string, dst string, commit, preserveOwner bool) *AddStep
AddStepFixtureNoChown returns a AddStep, panicing if it fails, for testing purposes.
func NewAddStep ¶
func NewAddStep(args, chown string, fromPaths []string, toPath string, commit, preserverOwner 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 based on content of files. If the previous steps, current step args and the contents of sources are identical, cache ID should also be identical.
type ArgStep ¶ added in v0.1.2
type ArgStep struct {
// contains filtered or unexported fields
}
ArgStep implements BuildStep and execute ARG directive
func (ArgStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s ArgStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. This function will not be skipped.
func (ArgStep) CacheID ¶ added in v0.1.2
func (s ArgStep) CacheID() string
CacheID returns the cache ID of the step.
func (ArgStep) Commit ¶ added in v0.1.2
func (s ArgStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (ArgStep) ContextDirs ¶ added in v0.1.2
ContextDirs returns directories that this step requires from another stage.
func (ArgStep) Execute ¶ added in v0.1.2
func (s ArgStep) 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 (ArgStep) HasCommit ¶ added in v0.1.2
func (s ArgStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (ArgStep) RequireOnDisk ¶ added in v0.1.2
func (s ArgStep) RequireOnDisk() bool
func (ArgStep) SetCacheID ¶ added in v0.1.2
func (s ArgStep) 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.
func (ArgStep) SetEnvFromContext ¶ added in v0.1.11
func (s ArgStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (ArgStep) SetWorkingDir ¶ added in v0.1.11
func (s ArgStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (ArgStep) String ¶ added in v0.1.2
func (s ArgStep) String() string
String returns the string representation of this step.
func (*ArgStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *ArgStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
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 // ApplyCtxAndConfig sets up the execution environment using image config // from previous step. // This function will not be skipped. ApplyCtxAndConfig(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) // UpdateCtxAndConfig generates a new image config base on config from // previous step. // This function will not be skipped. UpdateCtxAndConfig(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 NewArgStep ¶ added in v0.1.2
NewArgStep returns a BuildStep from given arguments.
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 given arguments.
func NewEnvStep ¶
NewEnvStep returns a BuildStep from given arguments.
func NewExposeStep ¶
NewExposeStep returns a BuildStep from given arguments.
func NewHealthcheckStep ¶ added in v0.1.3
func NewHealthcheckStep( args string, interval, timeout, startPeriod time.Duration, retries int, test []string, commit bool) (BuildStep, error)
NewHealthcheckStep returns a BuildStep from given arguments.
func NewLabelStep ¶
NewLabelStep returns a BuildStep from given arguments.
func NewMaintainerStep ¶
NewMaintainerStep returns a BuildStep from given arguments.
func NewStopsignalStep ¶ added in v0.1.1
NewStopsignalStep returns a BuildStep from given arguments.
func NewUserStep ¶
NewUserStep returns a BuildStep from given arguments.
func NewVolumeStep ¶
NewVolumeStep returns a BuildStep from given arguments.
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) ApplyCtxAndConfig ¶ added in v0.1.2
func (s CmdStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (CmdStep) SetEnvFromContext ¶ added in v0.1.11
func (s CmdStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (CmdStep) SetWorkingDir ¶ added in v0.1.11
func (s CmdStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (CmdStep) String ¶
func (s CmdStep) String() string
String returns the string representation of this step.
func (*CmdStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *CmdStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type CopyStep ¶
type CopyStep struct {
// contains filtered or unexported fields
}
CopyStep is similar to add, so they depend on a common base.
func CopyStepFixture ¶
func CopyStepFixture(args, fromStage string, srcs []string, dst string, commit, preserveOwner bool) *CopyStep
CopyStepFixture returns a CopyStep, panicing if it fails, for testing purposes.
func CopyStepFixtureNoChown ¶
func CopyStepFixtureNoChown(args, fromStage string, srcs []string, dst string, commit, preserveOwner 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, preserveOwner 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 based on content of files. If the previous steps, current step args and the contents of sources are identical, cache ID should also be identical.
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) ApplyCtxAndConfig ¶ added in v0.1.2
func (s EntrypointStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (EntrypointStep) SetEnvFromContext ¶ added in v0.1.11
func (s EntrypointStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (EntrypointStep) SetWorkingDir ¶ added in v0.1.11
func (s EntrypointStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (EntrypointStep) String ¶
func (s EntrypointStep) String() string
String returns the string representation of this step.
func (*EntrypointStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *EntrypointStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type EnvStep ¶
type EnvStep struct {
// contains filtered or unexported fields
}
EnvStep implements BuildStep and execute ENV directive
func (EnvStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s EnvStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (EnvStep) SetEnvFromContext ¶ added in v0.1.11
func (s EnvStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (EnvStep) SetWorkingDir ¶ added in v0.1.11
func (s EnvStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (EnvStep) String ¶
func (s EnvStep) String() string
String returns the string representation of this step.
func (*EnvStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *EnvStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type ExposeStep ¶
type ExposeStep struct {
// contains filtered or unexported fields
}
ExposeStep implements BuildStep and execute EXPOSE directive
func (ExposeStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s ExposeStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (ExposeStep) SetEnvFromContext ¶ added in v0.1.11
func (s ExposeStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (ExposeStep) SetWorkingDir ¶ added in v0.1.11
func (s ExposeStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (ExposeStep) String ¶
func (s ExposeStep) String() string
String returns the string representation of this step.
func (*ExposeStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *ExposeStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
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 given arguments.
func (FromStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s FromStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (FromStep) SetEnvFromContext ¶ added in v0.1.11
func (s FromStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (FromStep) SetWorkingDir ¶ added in v0.1.11
func (s FromStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (FromStep) String ¶
func (s FromStep) String() string
String returns the string representation of this step.
func (*FromStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *FromStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type HealthcheckStep ¶ added in v0.1.3
type HealthcheckStep struct { Interval time.Duration Timeout time.Duration StartPeriod time.Duration Retries int Test []string // contains filtered or unexported fields }
HealthcheckStep implements BuildStep and execute HEALTHCHECK directive
func (HealthcheckStep) ApplyCtxAndConfig ¶ added in v0.1.3
func (s HealthcheckStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. This function will not be skipped.
func (HealthcheckStep) CacheID ¶ added in v0.1.3
func (s HealthcheckStep) CacheID() string
CacheID returns the cache ID of the step.
func (HealthcheckStep) Commit ¶ added in v0.1.3
func (s HealthcheckStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (HealthcheckStep) ContextDirs ¶ added in v0.1.3
ContextDirs returns directories that this step requires from another stage.
func (HealthcheckStep) Execute ¶ added in v0.1.3
func (s HealthcheckStep) 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 (HealthcheckStep) HasCommit ¶ added in v0.1.3
func (s HealthcheckStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (HealthcheckStep) RequireOnDisk ¶ added in v0.1.3
func (s HealthcheckStep) RequireOnDisk() bool
func (HealthcheckStep) SetCacheID ¶ added in v0.1.3
func (s HealthcheckStep) 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.
func (HealthcheckStep) SetEnvFromContext ¶ added in v0.1.11
func (s HealthcheckStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (HealthcheckStep) SetWorkingDir ¶ added in v0.1.11
func (s HealthcheckStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (HealthcheckStep) String ¶ added in v0.1.3
func (s HealthcheckStep) String() string
String returns the string representation of this step.
func (*HealthcheckStep) UpdateCtxAndConfig ¶ added in v0.1.3
func (s *HealthcheckStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type LabelStep ¶
type LabelStep struct {
// contains filtered or unexported fields
}
LabelStep implements BuildStep and execute LABEL directive
func (LabelStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s LabelStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (LabelStep) SetEnvFromContext ¶ added in v0.1.11
func (s LabelStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (LabelStep) SetWorkingDir ¶ added in v0.1.11
func (s LabelStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (LabelStep) String ¶
func (s LabelStep) String() string
String returns the string representation of this step.
func (*LabelStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *LabelStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type MaintainerStep ¶
type MaintainerStep struct { Author string // contains filtered or unexported fields }
MaintainerStep implements BuildStep and execute MAINTAINER directive
func (MaintainerStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s MaintainerStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (MaintainerStep) SetEnvFromContext ¶ added in v0.1.11
func (s MaintainerStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (MaintainerStep) SetWorkingDir ¶ added in v0.1.11
func (s MaintainerStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (MaintainerStep) String ¶
func (s MaintainerStep) String() string
String returns the string representation of this step.
func (*MaintainerStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *MaintainerStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type RunStep ¶
type RunStep struct {
// contains filtered or unexported fields
}
RunStep implements BuildStep and execute RUN directive
func NewRunStep ¶
NewRunStep returns a BuildStep from given arguments.
func (*RunStep) ApplyCtxAndConfig ¶ added in v0.1.2
ApplyCtxAndConfig setup the user that should be used to run the command See ./user_step.go to see how it's set in image.Config
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) 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.
func (RunStep) SetEnvFromContext ¶ added in v0.1.11
func (s RunStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (RunStep) SetWorkingDir ¶ added in v0.1.11
func (s RunStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (RunStep) String ¶
func (s RunStep) String() string
String returns the string representation of this step.
func (RunStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s RunStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step. Default implementation makes a copy of given image config.
type StopsignalStep ¶ added in v0.1.1
type StopsignalStep struct { Signal int // contains filtered or unexported fields }
StopsignalStep implements BuildStep and execute STOPSIGNAL directive.
func (StopsignalStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s StopsignalStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. This function will not be skipped.
func (StopsignalStep) CacheID ¶ added in v0.1.1
func (s StopsignalStep) CacheID() string
CacheID returns the cache ID of the step.
func (StopsignalStep) Commit ¶ added in v0.1.1
func (s StopsignalStep) Commit(ctx *context.BuildContext) ([]*image.DigestPair, error)
Commit generates an image layer.
func (StopsignalStep) ContextDirs ¶ added in v0.1.1
ContextDirs returns directories that this step requires from another stage.
func (StopsignalStep) Execute ¶ added in v0.1.1
func (s StopsignalStep) 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 (StopsignalStep) HasCommit ¶ added in v0.1.1
func (s StopsignalStep) HasCommit() bool
HasCommit returns whether or not a particular commit step has a commit annotation.
func (StopsignalStep) RequireOnDisk ¶ added in v0.1.1
func (s StopsignalStep) RequireOnDisk() bool
func (StopsignalStep) SetCacheID ¶ added in v0.1.1
func (s StopsignalStep) 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.
func (StopsignalStep) SetEnvFromContext ¶ added in v0.1.11
func (s StopsignalStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (StopsignalStep) SetWorkingDir ¶ added in v0.1.11
func (s StopsignalStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (StopsignalStep) String ¶ added in v0.1.1
func (s StopsignalStep) String() string
String returns the string representation of this step.
func (*StopsignalStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *StopsignalStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type UserStep ¶
type UserStep struct {
// contains filtered or unexported fields
}
UserStep implements BuildStep and execute USER directive
func (UserStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s UserStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (UserStep) SetEnvFromContext ¶ added in v0.1.11
func (s UserStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (UserStep) SetWorkingDir ¶ added in v0.1.11
func (s UserStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (UserStep) String ¶
func (s UserStep) String() string
String returns the string representation of this step.
func (*UserStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *UserStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type VolumeStep ¶
type VolumeStep struct {
// contains filtered or unexported fields
}
VolumeStep implements BuildStep and execute VOLUME directive
func (VolumeStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s VolumeStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (VolumeStep) SetEnvFromContext ¶ added in v0.1.11
func (s VolumeStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (VolumeStep) SetWorkingDir ¶ added in v0.1.11
func (s VolumeStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (VolumeStep) String ¶
func (s VolumeStep) String() string
String returns the string representation of this step.
func (*VolumeStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *VolumeStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.
type WorkdirStep ¶
type WorkdirStep struct {
// contains filtered or unexported fields
}
WorkdirStep implements BuildStep and execute WORKDIR directive
func (WorkdirStep) ApplyCtxAndConfig ¶ added in v0.1.2
func (s WorkdirStep) ApplyCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) error
ApplyCtxAndConfig sets up the execution environment from build context and image config. 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) 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.
func (WorkdirStep) SetEnvFromContext ¶ added in v0.1.11
func (s WorkdirStep) SetEnvFromContext( ctx *context.BuildContext) error
SetEnvFromContext set environment variables from previous stages Exporting the logic to this method allows for an easier `ApplyCtxAndConfig` overwriting
func (WorkdirStep) SetWorkingDir ¶ added in v0.1.11
func (s WorkdirStep) SetWorkingDir( ctx *context.BuildContext, imageConfig *image.Config) error
SetWorkingDir set the working dir of the current step. Exporting the logic to this method allows overwriting `ApplyCtxAndConfig`.
func (WorkdirStep) String ¶
func (s WorkdirStep) String() string
String returns the string representation of this step.
func (*WorkdirStep) UpdateCtxAndConfig ¶ added in v0.1.2
func (s *WorkdirStep) UpdateCtxAndConfig( ctx *context.BuildContext, imageConfig *image.Config) (*image.Config, error)
UpdateCtxAndConfig updates mutable states in build context, and generates a new image config base on config from previous step.