Documentation
¶
Index ¶
- type AddCommand
- type ArgCommand
- type CmdCommand
- type CopyCommand
- type DockerCommand
- type EntrypointCommand
- type EnvCommand
- type ExposeCommand
- type HealthCheckCommand
- type LabelCommand
- type OnBuildCommand
- type RunCommand
- type ShellCommand
- type StopSignalCommand
- type UserCommand
- type VolumeCommand
- type WorkdirCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCommand ¶
type AddCommand struct {
// contains filtered or unexported fields
}
func (*AddCommand) CacheCommand ¶ added in v0.4.0
func (a *AddCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*AddCommand) ExecuteCommand ¶
func (a *AddCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand executes the ADD command Special stuff about ADD:
- If <src> is a remote file URL: - destination will have permissions of 0600 - If remote file has HTTP Last-Modified header, we set the mtime of the file to that timestamp - If dest doesn't end with a slash, the filepath is inferred to be <dest>/<filename>
- If <src> is a local tar archive: -If <src> is a local tar archive, it is unpacked at the dest, as 'tar -x' would
func (*AddCommand) FilesToSnapshot ¶
func (a *AddCommand) FilesToSnapshot() []string
FilesToSnapshot should return an empty array if still nil; no files were changed
func (*AddCommand) String ¶ added in v0.4.0
func (a *AddCommand) String() string
String returns some information about the command for the image config
type ArgCommand ¶
type ArgCommand struct {
// contains filtered or unexported fields
}
func (*ArgCommand) CacheCommand ¶ added in v0.4.0
func (r *ArgCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*ArgCommand) ExecuteCommand ¶
func (r *ArgCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand only needs to add this ARG key/value as seen
func (*ArgCommand) FilesToSnapshot ¶
func (r *ArgCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this command only touches metadata.
func (*ArgCommand) String ¶ added in v0.4.0
func (r *ArgCommand) String() string
String returns some information about the command for the image config history
type CmdCommand ¶
type CmdCommand struct {
// contains filtered or unexported fields
}
func (*CmdCommand) CacheCommand ¶ added in v0.4.0
func (c *CmdCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*CmdCommand) ExecuteCommand ¶
func (c *CmdCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand executes the CMD command Argument handling is the same as RUN.
func (*CmdCommand) FilesToSnapshot ¶
func (c *CmdCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this is a metadata command
func (*CmdCommand) String ¶ added in v0.4.0
func (c *CmdCommand) String() string
String returns some information about the command for the image config history
type CopyCommand ¶
type CopyCommand struct {
// contains filtered or unexported fields
}
func (*CopyCommand) CacheCommand ¶ added in v0.4.0
func (c *CopyCommand) CacheCommand() bool
CacheCommand returns true since this command should be cached
func (*CopyCommand) ExecuteCommand ¶
func (c *CopyCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*CopyCommand) FilesToSnapshot ¶
func (c *CopyCommand) FilesToSnapshot() []string
FilesToSnapshot should return an empty array if still nil; no files were changed
func (*CopyCommand) String ¶ added in v0.4.0
func (c *CopyCommand) String() string
String returns some information about the command for the image config
type DockerCommand ¶
type DockerCommand interface {
// ExecuteCommand is responsible for:
// 1. Making required changes to the filesystem (ex. copying files for ADD/COPY or setting ENV variables)
// 2. Updating metadata fields in the config
// It should not change the config history.
ExecuteCommand(*v1.Config, *dockerfile.BuildArgs) error
// Returns a string representation of the command
String() string
// A list of files to snapshot, empty for metadata commands or nil if we don't know
FilesToSnapshot() []string
// Return true if this command should be true
// Currently only true for RUN
CacheCommand() bool
}
func GetCommand ¶
func GetCommand(cmd instructions.Command, buildcontext string) (DockerCommand, error)
type EntrypointCommand ¶
type EntrypointCommand struct {
// contains filtered or unexported fields
}
func (*EntrypointCommand) CacheCommand ¶ added in v0.4.0
func (e *EntrypointCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*EntrypointCommand) ExecuteCommand ¶
func (e *EntrypointCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand handles command processing similar to CMD and RUN,
func (*EntrypointCommand) FilesToSnapshot ¶
func (e *EntrypointCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this is a metadata command
func (*EntrypointCommand) String ¶ added in v0.4.0
func (e *EntrypointCommand) String() string
String returns some information about the command for the image config history
type EnvCommand ¶
type EnvCommand struct {
// contains filtered or unexported fields
}
func (*EnvCommand) CacheCommand ¶ added in v0.4.0
func (e *EnvCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*EnvCommand) ExecuteCommand ¶
func (e *EnvCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*EnvCommand) FilesToSnapshot ¶
func (e *EnvCommand) FilesToSnapshot() []string
We know that no files have changed, so return an empty array
func (*EnvCommand) String ¶ added in v0.4.0
func (e *EnvCommand) String() string
String returns some information about the command for the image config history
type ExposeCommand ¶
type ExposeCommand struct {
// contains filtered or unexported fields
}
func (*ExposeCommand) CacheCommand ¶ added in v0.4.0
func (r *ExposeCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*ExposeCommand) ExecuteCommand ¶
func (r *ExposeCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*ExposeCommand) FilesToSnapshot ¶
func (r *ExposeCommand) FilesToSnapshot() []string
func (*ExposeCommand) String ¶ added in v0.4.0
func (r *ExposeCommand) String() string
type HealthCheckCommand ¶
type HealthCheckCommand struct {
// contains filtered or unexported fields
}
func (*HealthCheckCommand) CacheCommand ¶ added in v0.4.0
func (h *HealthCheckCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*HealthCheckCommand) ExecuteCommand ¶
func (h *HealthCheckCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand handles command processing similar to CMD and RUN,
func (*HealthCheckCommand) FilesToSnapshot ¶
func (h *HealthCheckCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this is a metadata command
func (*HealthCheckCommand) String ¶ added in v0.4.0
func (h *HealthCheckCommand) String() string
String returns some information about the command for the image config history
type LabelCommand ¶
type LabelCommand struct {
// contains filtered or unexported fields
}
func (*LabelCommand) CacheCommand ¶ added in v0.4.0
func (r *LabelCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*LabelCommand) ExecuteCommand ¶
func (r *LabelCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*LabelCommand) FilesToSnapshot ¶
func (r *LabelCommand) FilesToSnapshot() []string
No files have changed, this command only touches metadata.
func (*LabelCommand) String ¶ added in v0.4.0
func (r *LabelCommand) String() string
String returns some information about the command for the image config history
type OnBuildCommand ¶
type OnBuildCommand struct {
// contains filtered or unexported fields
}
func (*OnBuildCommand) CacheCommand ¶ added in v0.4.0
func (o *OnBuildCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*OnBuildCommand) ExecuteCommand ¶
func (o *OnBuildCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand adds the specified expression in Onbuild to the config
func (*OnBuildCommand) FilesToSnapshot ¶
func (o *OnBuildCommand) FilesToSnapshot() []string
FilesToSnapshot returns that no files have changed, this command only touches metadata.
func (*OnBuildCommand) String ¶ added in v0.4.0
func (o *OnBuildCommand) String() string
String returns some information about the command for the image config history
type RunCommand ¶
type RunCommand struct {
// contains filtered or unexported fields
}
func (*RunCommand) CacheCommand ¶ added in v0.4.0
func (r *RunCommand) CacheCommand() bool
CacheCommand returns true since this command should be cached
func (*RunCommand) ExecuteCommand ¶
func (r *RunCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*RunCommand) FilesToSnapshot ¶
func (r *RunCommand) FilesToSnapshot() []string
FilesToSnapshot returns nil for this command because we don't know which files have changed, so we snapshot the entire system.
func (*RunCommand) String ¶ added in v0.4.0
func (r *RunCommand) String() string
String returns some information about the command for the image config
type ShellCommand ¶
type ShellCommand struct {
// contains filtered or unexported fields
}
func (*ShellCommand) CacheCommand ¶ added in v0.4.0
func (s *ShellCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*ShellCommand) ExecuteCommand ¶
func (s *ShellCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand handles command processing similar to CMD and RUN,
func (*ShellCommand) FilesToSnapshot ¶
func (s *ShellCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this is a metadata command
func (*ShellCommand) String ¶ added in v0.4.0
func (s *ShellCommand) String() string
String returns some information about the command for the image config history
type StopSignalCommand ¶
type StopSignalCommand struct {
// contains filtered or unexported fields
}
func (*StopSignalCommand) CacheCommand ¶ added in v0.4.0
func (s *StopSignalCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*StopSignalCommand) ExecuteCommand ¶
func (s *StopSignalCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
ExecuteCommand handles command processing similar to CMD and RUN,
func (*StopSignalCommand) FilesToSnapshot ¶
func (s *StopSignalCommand) FilesToSnapshot() []string
FilesToSnapshot returns an empty array since this is a metadata command
func (*StopSignalCommand) String ¶ added in v0.4.0
func (s *StopSignalCommand) String() string
String returns some information about the command for the image config history
type UserCommand ¶
type UserCommand struct {
// contains filtered or unexported fields
}
func (*UserCommand) CacheCommand ¶ added in v0.4.0
func (r *UserCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*UserCommand) ExecuteCommand ¶
func (r *UserCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*UserCommand) FilesToSnapshot ¶
func (r *UserCommand) FilesToSnapshot() []string
func (*UserCommand) String ¶ added in v0.4.0
func (r *UserCommand) String() string
type VolumeCommand ¶
type VolumeCommand struct {
// contains filtered or unexported fields
}
func (*VolumeCommand) CacheCommand ¶ added in v0.4.0
func (v *VolumeCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*VolumeCommand) ExecuteCommand ¶
func (v *VolumeCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*VolumeCommand) FilesToSnapshot ¶
func (v *VolumeCommand) FilesToSnapshot() []string
func (*VolumeCommand) String ¶ added in v0.4.0
func (v *VolumeCommand) String() string
type WorkdirCommand ¶
type WorkdirCommand struct {
// contains filtered or unexported fields
}
func (*WorkdirCommand) CacheCommand ¶ added in v0.4.0
func (w *WorkdirCommand) CacheCommand() bool
CacheCommand returns false since this command shouldn't be cached
func (*WorkdirCommand) ExecuteCommand ¶
func (w *WorkdirCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*WorkdirCommand) FilesToSnapshot ¶
func (w *WorkdirCommand) FilesToSnapshot() []string
FilesToSnapshot returns the workingdir, which should have been created if it didn't already exist
func (*WorkdirCommand) String ¶ added in v0.4.0
func (w *WorkdirCommand) String() string
String returns some information about the command for the image config history