Documentation
¶
Index ¶
- func EnvToSortedArr(env map[string]string) (r []string)
- type Add
- func (stg *Add) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *Add) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *Add) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *Add) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- type Base
- func (stg *Base[T, BT]) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *Base[T, BT]) ExpandInstruction(_ stage.Conveyor, env map[string]string) error
- func (stg *Base[T, BT]) GetExpandedEnv(c stage.Conveyor) map[string]string
- func (stg *Base[T, BT]) GetExpandedEnvForContent() map[string]string
- func (stg *Base[T, BT]) HasPrevStage() bool
- func (stg *Base[T, BT]) IsStapelStage() bool
- func (stg *Base[T, BT]) PrepareImage(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) error
- func (stg *Base[T, BT]) UsesBuildContext() bool
- type Cmd
- type Copy
- func (stg *Copy) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *Copy) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *Copy) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *Copy) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- type Entrypoint
- type Env
- type Expose
- type From
- func (stg *From) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (s *From) FetchDependencies(_ context.Context, _ stage.Conveyor, _ container_backend.ContainerBackend, ...) error
- func (s *From) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (s *From) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- func (stg *From) HasPrevStage() bool
- func (stg *From) IsStapelStage() bool
- func (s *From) PreRun(ctx context.Context, _ stage.Conveyor) error
- func (stg *From) PrepareImage(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) error
- func (stg *From) UsesBuildContext() bool
- type Healthcheck
- type InstructionExpander
- type Label
- type Maintainer
- type OnBuild
- type Run
- func (stg *Run) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *Run) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *Run) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *Run) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- type Shell
- type StopSignal
- func (stg *StopSignal) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *StopSignal) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *StopSignal) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *StopSignal) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- type User
- func (stg *User) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *User) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *User) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *User) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
- type Volume
- type Workdir
- func (stg *Workdir) ExpandDependencies(ctx context.Context, c stage.Conveyor, baseEnv map[string]string) error
- func (stg *Workdir) ExpandInstruction(c stage.Conveyor, env map[string]string) error
- func (stg *Workdir) GetContentDependencies(ctx context.Context, c stage.Conveyor, ...) (string, error)
- func (stg *Workdir) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvToSortedArr ¶
Types ¶
type Add ¶
type Add struct {
*Base[*instructions.AddCommand, *backend_instruction.Add]
}
func NewAdd ¶
func NewAdd(i *dockerfile.DockerfileStageInstruction[*instructions.AddCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Add
func (*Add) ExpandDependencies ¶
func (*Add) ExpandInstruction ¶
func (*Add) GetContentDependencies ¶
func (stg *Add) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Add) GetDependencies ¶
func (stg *Add) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Base ¶
type Base[T dockerfile.InstructionDataInterface, BT container_backend.InstructionInterface] struct { *stage.BaseStage // contains filtered or unexported fields }
func NewBase ¶
func NewBase[T dockerfile.InstructionDataInterface, BT container_backend.InstructionInterface](instruction *dockerfile.DockerfileStageInstruction[T], backendInstruction BT, dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Base[T, BT]
func (*Base[T, BT]) ExpandDependencies ¶
func (*Base[T, BT]) ExpandInstruction ¶
func (*Base[T, BT]) GetExpandedEnv ¶
func (*Base[T, BT]) GetExpandedEnvForContent ¶
GetExpandedEnvForContent is the environment a content digest is derived from: the environment the instruction itself declares, with dependency build args resolved to stable placeholders. It never reads the environment of the built base image, which is only known once the base image exists — the content of a base image reaches the digest through the anchor digest of that image instead.
func (*Base[T, BT]) HasPrevStage ¶
func (*Base[T, BT]) IsStapelStage ¶
func (*Base[T, BT]) PrepareImage ¶
func (stg *Base[T, BT]) PrepareImage(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevBuiltImage, stageImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) error
func (*Base[T, BT]) UsesBuildContext ¶
type Cmd ¶
type Cmd struct {
*Base[*instructions.CmdCommand, *backend_instruction.Cmd]
}
func NewCmd ¶
func NewCmd(i *dockerfile.DockerfileStageInstruction[*instructions.CmdCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Cmd
func (*Cmd) GetContentDependencies ¶
func (stg *Cmd) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Cmd) GetDependencies ¶
func (stg *Cmd) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Copy ¶
type Copy struct {
*Base[*instructions.CopyCommand, *backend_instruction.Copy]
}
func NewCopy ¶
func NewCopy(i *dockerfile.DockerfileStageInstruction[*instructions.CopyCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Copy
func (*Copy) ExpandDependencies ¶
func (*Copy) ExpandInstruction ¶
func (*Copy) GetContentDependencies ¶
func (stg *Copy) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Copy) GetDependencies ¶
func (stg *Copy) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Entrypoint ¶
type Entrypoint struct {
*Base[*instructions.EntrypointCommand, *backend_instruction.Entrypoint]
}
func NewEntrypoint ¶
func NewEntrypoint(i *dockerfile.DockerfileStageInstruction[*instructions.EntrypointCommand], dependencies []*config.Dependency, hasPrevStage, entrypointResetCMD bool, opts *stage.BaseStageOptions) *Entrypoint
func (*Entrypoint) GetContentDependencies ¶
func (stg *Entrypoint) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Entrypoint) GetDependencies ¶
func (stg *Entrypoint) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Env ¶
type Env struct {
*Base[*instructions.EnvCommand, *backend_instruction.Env]
}
func NewEnv ¶
func NewEnv(i *dockerfile.DockerfileStageInstruction[*instructions.EnvCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Env
func (*Env) GetContentDependencies ¶
func (stg *Env) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Env) GetDependencies ¶
func (stg *Env) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Expose ¶
type Expose struct {
*Base[*instructions.ExposeCommand, *backend_instruction.Expose]
}
func NewExpose ¶
func NewExpose(i *dockerfile.DockerfileStageInstruction[*instructions.ExposeCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Expose
func (*Expose) GetContentDependencies ¶
func (stg *Expose) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Expose) GetDependencies ¶
func (stg *Expose) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type From ¶
type From struct {
stage.BaseStage
BaseImageReference string
BaseImageRepoDigest string
// contains filtered or unexported fields
}
func NewFrom ¶
func NewFrom(baseImageReference, baseImageRepoDigest, imageCacheVersion string, dependencies []*config.Dependency, dockerfileExpanderFactory dockerfile.ExpanderFactory, opts *stage.BaseStageOptions) *From
func (*From) ExpandDependencies ¶
func (*From) FetchDependencies ¶
func (s *From) FetchDependencies(_ context.Context, _ stage.Conveyor, _ container_backend.ContainerBackend, _ docker_registry.GenericApiInterface) error
func (*From) GetContentDependencies ¶
func (s *From) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*From) GetDependencies ¶
func (s *From) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*From) HasPrevStage ¶
func (*From) IsStapelStage ¶
func (*From) PrepareImage ¶
func (stg *From) PrepareImage(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevBuiltImage, stageImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) error
func (*From) UsesBuildContext ¶
type Healthcheck ¶
type Healthcheck struct {
*Base[*instructions.HealthCheckCommand, *backend_instruction.Healthcheck]
}
func NewHealthcheck ¶
func NewHealthcheck(i *dockerfile.DockerfileStageInstruction[*instructions.HealthCheckCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Healthcheck
func (*Healthcheck) GetContentDependencies ¶
func (stg *Healthcheck) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Healthcheck) GetDependencies ¶
func (stg *Healthcheck) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type InstructionExpander ¶
type Label ¶
type Label struct {
*Base[*instructions.LabelCommand, *backend_instruction.Label]
}
func NewLabel ¶
func NewLabel(i *dockerfile.DockerfileStageInstruction[*instructions.LabelCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Label
func (*Label) GetContentDependencies ¶
func (stg *Label) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Label) GetDependencies ¶
func (stg *Label) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Maintainer ¶
type Maintainer struct {
*Base[*instructions.MaintainerCommand, *backend_instruction.Maintainer]
}
func NewMaintainer ¶
func NewMaintainer(i *dockerfile.DockerfileStageInstruction[*instructions.MaintainerCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Maintainer
func (*Maintainer) GetContentDependencies ¶
func (stg *Maintainer) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Maintainer) GetDependencies ¶
func (stg *Maintainer) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type OnBuild ¶
type OnBuild struct {
*Base[*instructions.OnbuildCommand, *backend_instruction.OnBuild]
}
func NewOnBuild ¶
func NewOnBuild(i *dockerfile.DockerfileStageInstruction[*instructions.OnbuildCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *OnBuild
func (*OnBuild) GetContentDependencies ¶
func (stg *OnBuild) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*OnBuild) GetDependencies ¶
func (stg *OnBuild) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Run ¶
type Run struct {
*Base[*instructions.RunCommand, *backend_instruction.Run]
}
func NewRun ¶
func NewRun(i *dockerfile.DockerfileStageInstruction[*instructions.RunCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions, secrets []string, ssh string) *Run
func (*Run) ExpandDependencies ¶
func (*Run) ExpandInstruction ¶
func (*Run) GetContentDependencies ¶
func (stg *Run) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Run) GetDependencies ¶
func (stg *Run) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Shell ¶
type Shell struct {
*Base[*instructions.ShellCommand, *backend_instruction.Shell]
}
func NewShell ¶
func NewShell(i *dockerfile.DockerfileStageInstruction[*instructions.ShellCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Shell
func (*Shell) GetContentDependencies ¶
func (stg *Shell) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Shell) GetDependencies ¶
func (stg *Shell) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type StopSignal ¶
type StopSignal struct {
*Base[*instructions.StopSignalCommand, *backend_instruction.StopSignal]
}
func NewStopSignal ¶
func NewStopSignal(i *dockerfile.DockerfileStageInstruction[*instructions.StopSignalCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *StopSignal
func (*StopSignal) ExpandDependencies ¶
func (*StopSignal) ExpandInstruction ¶
func (*StopSignal) GetContentDependencies ¶
func (stg *StopSignal) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*StopSignal) GetDependencies ¶
func (stg *StopSignal) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type User ¶
type User struct {
*Base[*instructions.UserCommand, *backend_instruction.User]
}
func NewUser ¶
func NewUser(i *dockerfile.DockerfileStageInstruction[*instructions.UserCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *User
func (*User) ExpandDependencies ¶
func (*User) ExpandInstruction ¶
func (*User) GetContentDependencies ¶
func (stg *User) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*User) GetDependencies ¶
func (stg *User) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Volume ¶
type Volume struct {
*Base[*instructions.VolumeCommand, *backend_instruction.Volume]
}
func NewVolume ¶
func NewVolume(i *dockerfile.DockerfileStageInstruction[*instructions.VolumeCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Volume
func (*Volume) GetContentDependencies ¶
func (stg *Volume) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Volume) GetDependencies ¶
func (stg *Volume) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)
type Workdir ¶
type Workdir struct {
*Base[*instructions.WorkdirCommand, *backend_instruction.Workdir]
}
func NewWorkdir ¶
func NewWorkdir(i *dockerfile.DockerfileStageInstruction[*instructions.WorkdirCommand], dependencies []*config.Dependency, hasPrevStage bool, opts *stage.BaseStageOptions) *Workdir
func (*Workdir) ExpandDependencies ¶
func (*Workdir) ExpandInstruction ¶
func (*Workdir) GetContentDependencies ¶
func (stg *Workdir) GetContentDependencies(ctx context.Context, c stage.Conveyor, buildContextArchive container_backend.BuildContextArchiver) (string, error)
func (*Workdir) GetDependencies ¶
func (stg *Workdir) GetDependencies(ctx context.Context, c stage.Conveyor, cb container_backend.ContainerBackend, prevImage, prevBuiltImage *stage.StageImage, buildContextArchive container_backend.BuildContextArchiver) (string, error)