Documentation ¶
Index ¶
- type AddCommand
- type ArgCommand
- type BaseCommand
- 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 { BaseCommand // contains filtered or unexported fields }
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) FilesUsedFromContext ¶ added in v0.5.0
func (a *AddCommand) FilesUsedFromContext(config *v1.Config, buildArgs *dockerfile.BuildArgs) ([]string, error)
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 { BaseCommand // contains filtered or unexported fields }
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) String ¶ added in v0.4.0
func (r *ArgCommand) String() string
String returns some information about the command for the image config history
type BaseCommand ¶ added in v0.5.0
type BaseCommand struct {
// contains filtered or unexported fields
}
func (*BaseCommand) CacheCommand ¶ added in v0.5.0
func (b *BaseCommand) CacheCommand() bool
func (*BaseCommand) FilesToSnapshot ¶ added in v0.5.0
func (b *BaseCommand) FilesToSnapshot() []string
func (*BaseCommand) FilesUsedFromContext ¶ added in v0.5.0
func (b *BaseCommand) FilesUsedFromContext(_ *v1.Config, _ *dockerfile.BuildArgs) ([]string, error)
type CmdCommand ¶
type CmdCommand struct { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // contains filtered or unexported fields }
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) FilesUsedFromContext ¶ added in v0.5.0
func (c *CopyCommand) FilesUsedFromContext(config *v1.Config, buildArgs *dockerfile.BuildArgs) ([]string, error)
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 // Return true if this command depends on the build context. FilesUsedFromContext(*v1.Config, *dockerfile.BuildArgs) ([]string, error) }
func GetCommand ¶
func GetCommand(cmd instructions.Command, buildcontext string) (DockerCommand, error)
type EntrypointCommand ¶
type EntrypointCommand struct { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // contains filtered or unexported fields }
func (*EnvCommand) ExecuteCommand ¶
func (e *EnvCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
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 { BaseCommand // contains filtered or unexported fields }
func (*ExposeCommand) ExecuteCommand ¶
func (r *ExposeCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*ExposeCommand) String ¶ added in v0.4.0
func (r *ExposeCommand) String() string
type HealthCheckCommand ¶
type HealthCheckCommand struct { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // contains filtered or unexported fields }
func (*LabelCommand) ExecuteCommand ¶
func (r *LabelCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
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 { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // 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
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 { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // contains filtered or unexported fields }
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) 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 { BaseCommand // contains filtered or unexported fields }
func (*UserCommand) ExecuteCommand ¶
func (r *UserCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error
func (*UserCommand) String ¶ added in v0.4.0
func (r *UserCommand) String() string
type VolumeCommand ¶
type VolumeCommand struct { BaseCommand // contains filtered or unexported fields }
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 { BaseCommand // contains filtered or unexported fields }
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