Documentation ¶
Index ¶
- func ContainerLockName(containerName string) string
- func ImageLockName(imageName string) string
- func IsStartContainerErr(err error) bool
- func ShelloutPack(command string) string
- type BuildOptions
- type BuilderContainer
- type Container
- type ContainerOptions
- type ContainerRuntime
- type DockerImage
- type DockerfileImageBuilder
- type Image
- type ImageInterface
- type LocalDockerServerRuntime
- func (runtime *LocalDockerServerRuntime) GetImageInspect(ctx context.Context, ref string) (*types.ImageInspect, error)
- func (runtime *LocalDockerServerRuntime) PullImage(ctx context.Context, ref string) error
- func (runtime *LocalDockerServerRuntime) PullImageFromRegistry(ctx context.Context, img Image) error
- func (runtime *LocalDockerServerRuntime) PushBuiltImage(ctx context.Context, img Image) error
- func (runtime *LocalDockerServerRuntime) PushImage(ctx context.Context, img Image) error
- func (runtime *LocalDockerServerRuntime) RefreshImageObject(ctx context.Context, img Image) error
- func (runtime *LocalDockerServerRuntime) RemoveImage(ctx context.Context, img Image) error
- func (runtime *LocalDockerServerRuntime) RenameImage(ctx context.Context, img Image, newImageName string, removeOldName bool) error
- func (runtime *LocalDockerServerRuntime) String() string
- func (runtime *LocalDockerServerRuntime) TagBuiltImageByName(ctx context.Context, img Image) error
- type LocalHostRuntime
- type StageImage
- func (i *StageImage) Build(ctx context.Context, options BuildOptions) error
- func (i *StageImage) BuilderContainer() BuilderContainer
- func (i *StageImage) Commit(ctx context.Context) error
- func (i *StageImage) Container() Container
- func (i *StageImage) DockerfileImageBuilder() *DockerfileImageBuilder
- func (i *StageImage) Export(ctx context.Context, name string) error
- func (i *StageImage) GetBuiltId() string
- func (i *StageImage) GetID() string
- func (i *StageImage) GetInspect() *types.ImageInspect
- func (i StageImage) GetStageDescription() *image.StageDescription
- func (i *StageImage) Import(ctx context.Context, name string) error
- func (i *StageImage) Inspect() *types.ImageInspect
- func (i *StageImage) Introspect(ctx context.Context) error
- func (i StageImage) IsExistsLocally() bool
- func (i *StageImage) MustGetBuiltId() string
- func (i *StageImage) MustResetInspect(ctx context.Context) error
- func (i StageImage) Name() string
- func (i *StageImage) Pull(ctx context.Context) error
- func (i *StageImage) Push(ctx context.Context) error
- func (i StageImage) SetInspect(inspect *types.ImageInspect)
- func (i StageImage) SetName(name string)
- func (i StageImage) SetStageDescription(stageDesc *image.StageDescription)
- func (i *StageImage) Tag(ctx context.Context, name string) error
- func (i *StageImage) TagBuiltImage(ctx context.Context, name string) error
- func (i StageImage) UnsetInspect()
- func (i StageImage) Untag(ctx context.Context) error
- type StageImageBuilderContainer
- func (c *StageImageBuilderContainer) AddEnv(envs map[string]string)
- func (c *StageImageBuilderContainer) AddExpose(exposes ...string)
- func (c *StageImageBuilderContainer) AddLabel(labels map[string]string)
- func (c *StageImageBuilderContainer) AddRunCommands(commands ...string)
- func (c *StageImageBuilderContainer) AddServiceRunCommands(commands ...string)
- func (c *StageImageBuilderContainer) AddVolume(volumes ...string)
- func (c *StageImageBuilderContainer) AddVolumeFrom(volumesFrom ...string)
- type StageImageContainer
- func (c *StageImageContainer) AddRunCommands(commands ...string)
- func (c *StageImageContainer) AddServiceRunCommands(commands ...string)
- func (c *StageImageContainer) CommitChangeOptions() ContainerOptions
- func (c *StageImageContainer) Name() string
- func (c *StageImageContainer) RunOptions() ContainerOptions
- func (c *StageImageContainer) ServiceCommitChangeOptions() ContainerOptions
- func (c *StageImageContainer) UserCommitChanges() []string
- func (c *StageImageContainer) UserRunCommands() []string
- type StageImageContainerOptions
- func (co *StageImageContainerOptions) AddCmd(cmd string)
- func (co *StageImageContainerOptions) AddEntrypoint(entrypoint string)
- func (co *StageImageContainerOptions) AddEnv(envs map[string]string)
- func (co *StageImageContainerOptions) AddExpose(exposes ...string)
- func (co *StageImageContainerOptions) AddHealthCheck(check string)
- func (co *StageImageContainerOptions) AddLabel(labels map[string]string)
- func (co *StageImageContainerOptions) AddUser(user string)
- func (co *StageImageContainerOptions) AddVolume(volumes ...string)
- func (co *StageImageContainerOptions) AddVolumeFrom(volumesFrom ...string)
- func (co *StageImageContainerOptions) AddWorkdir(workdir string)
- type WerfImage
- func (i *WerfImage) Export(ctx context.Context) error
- func (i WerfImage) GetStageDescription() *image.StageDescription
- func (i WerfImage) IsExistsLocally() bool
- func (i WerfImage) Name() string
- func (i WerfImage) SetInspect(inspect *types.ImageInspect)
- func (i WerfImage) SetName(name string)
- func (i WerfImage) SetStageDescription(stageDesc *image.StageDescription)
- func (i *WerfImage) Tag(ctx context.Context) error
- func (i WerfImage) UnsetInspect()
- func (i WerfImage) Untag(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerLockName ¶
func ImageLockName ¶
func IsStartContainerErr ¶
func ShelloutPack ¶
Types ¶
type BuildOptions ¶
type BuilderContainer ¶
type Container ¶
type Container interface { Name() string UserRunCommands() []string UserCommitChanges() []string AddServiceRunCommands(commands ...string) AddRunCommands(commands ...string) RunOptions() ContainerOptions CommitChangeOptions() ContainerOptions ServiceCommitChangeOptions() ContainerOptions }
type ContainerOptions ¶
type ContainerOptions interface { AddVolume(volumes ...string) AddVolumeFrom(volumesFrom ...string) AddExpose(exposes ...string) AddEnv(envs map[string]string) AddLabel(labels map[string]string) AddCmd(cmd string) AddWorkdir(workdir string) AddUser(user string) AddEntrypoint(entrypoint string) AddHealthCheck(check string) }
type ContainerRuntime ¶
type ContainerRuntime interface { RefreshImageObject(ctx context.Context, img Image) error PullImageFromRegistry(ctx context.Context, img Image) error RenameImage(ctx context.Context, img Image, newImageName string, removeOldName bool) error RemoveImage(ctx context.Context, img Image) error String() string }
type DockerImage ¶
type DockerImage struct {
Image ImageInterface
}
type DockerfileImageBuilder ¶
type DockerfileImageBuilder struct { BuildArgs []string // contains filtered or unexported fields }
func NewDockerfileImageBuilder ¶
func NewDockerfileImageBuilder() *DockerfileImageBuilder
func (*DockerfileImageBuilder) AppendBuildArgs ¶
func (b *DockerfileImageBuilder) AppendBuildArgs(buildArgs ...string)
func (*DockerfileImageBuilder) Build ¶
func (b *DockerfileImageBuilder) Build(ctx context.Context) error
func (*DockerfileImageBuilder) Cleanup ¶
func (b *DockerfileImageBuilder) Cleanup(ctx context.Context) error
func (*DockerfileImageBuilder) GetBuiltId ¶
func (b *DockerfileImageBuilder) GetBuiltId() string
type ImageInterface ¶
type ImageInterface interface { Name() string SetName(name string) Pull(ctx context.Context) error Untag(ctx context.Context) error // TODO: build specifics for stapel builder and dockerfile builder // TODO: should be under a single separate interface Container() Container BuilderContainer() BuilderContainer DockerfileImageBuilder() *DockerfileImageBuilder Build(context.Context, BuildOptions) error GetBuiltId() string TagBuiltImage(ctx context.Context, name string) error Export(ctx context.Context, name string) error Introspect(ctx context.Context) error SetInspect(inspect *types.ImageInspect) IsExistsLocally() bool SetStageDescription(stage *image.StageDescription) GetStageDescription() *image.StageDescription }
type LocalDockerServerRuntime ¶
type LocalDockerServerRuntime struct{}
func (*LocalDockerServerRuntime) GetImageInspect ¶
func (runtime *LocalDockerServerRuntime) GetImageInspect(ctx context.Context, ref string) (*types.ImageInspect, error)
GetImageInspect only available for LocalDockerServerRuntime
func (*LocalDockerServerRuntime) PullImage ¶ added in v1.1.23
func (runtime *LocalDockerServerRuntime) PullImage(ctx context.Context, ref string) error
PullImage only available for LocalDockerServerRuntime
func (*LocalDockerServerRuntime) PullImageFromRegistry ¶
func (runtime *LocalDockerServerRuntime) PullImageFromRegistry(ctx context.Context, img Image) error
func (*LocalDockerServerRuntime) PushBuiltImage ¶
func (runtime *LocalDockerServerRuntime) PushBuiltImage(ctx context.Context, img Image) error
PushBuiltImage is only available for LocalDockerServerRuntime
func (*LocalDockerServerRuntime) PushImage ¶
func (runtime *LocalDockerServerRuntime) PushImage(ctx context.Context, img Image) error
func (*LocalDockerServerRuntime) RefreshImageObject ¶
func (runtime *LocalDockerServerRuntime) RefreshImageObject(ctx context.Context, img Image) error
func (*LocalDockerServerRuntime) RemoveImage ¶
func (runtime *LocalDockerServerRuntime) RemoveImage(ctx context.Context, img Image) error
func (*LocalDockerServerRuntime) RenameImage ¶
func (*LocalDockerServerRuntime) String ¶
func (runtime *LocalDockerServerRuntime) String() string
func (*LocalDockerServerRuntime) TagBuiltImageByName ¶
func (runtime *LocalDockerServerRuntime) TagBuiltImageByName(ctx context.Context, img Image) error
TagBuiltImageByName is only available for LocalDockerServerRuntime
type LocalHostRuntime ¶
type LocalHostRuntime struct {
ContainerRuntime // TODO: kaniko-like builds
}
func (*LocalHostRuntime) String ¶
func (runtime *LocalHostRuntime) String() string
type StageImage ¶
type StageImage struct {
// contains filtered or unexported fields
}
func NewStageImage ¶
func NewStageImage(fromImage *StageImage, name string, localDockerServerRuntime *LocalDockerServerRuntime) *StageImage
func (*StageImage) Build ¶
func (i *StageImage) Build(ctx context.Context, options BuildOptions) error
func (*StageImage) BuilderContainer ¶
func (i *StageImage) BuilderContainer() BuilderContainer
func (*StageImage) Container ¶
func (i *StageImage) Container() Container
func (*StageImage) DockerfileImageBuilder ¶
func (i *StageImage) DockerfileImageBuilder() *DockerfileImageBuilder
func (*StageImage) GetBuiltId ¶
func (i *StageImage) GetBuiltId() string
func (*StageImage) GetID ¶
func (i *StageImage) GetID() string
func (*StageImage) GetInspect ¶
func (i *StageImage) GetInspect() *types.ImageInspect
func (StageImage) GetStageDescription ¶
func (i StageImage) GetStageDescription() *image.StageDescription
func (*StageImage) Inspect ¶
func (i *StageImage) Inspect() *types.ImageInspect
func (*StageImage) Introspect ¶
func (i *StageImage) Introspect(ctx context.Context) error
func (StageImage) IsExistsLocally ¶
func (i StageImage) IsExistsLocally() bool
func (*StageImage) MustGetBuiltId ¶
func (i *StageImage) MustGetBuiltId() string
func (*StageImage) MustResetInspect ¶
func (i *StageImage) MustResetInspect(ctx context.Context) error
func (StageImage) SetInspect ¶
func (i StageImage) SetInspect(inspect *types.ImageInspect)
func (StageImage) SetStageDescription ¶
func (i StageImage) SetStageDescription(stageDesc *image.StageDescription)
func (*StageImage) TagBuiltImage ¶
func (i *StageImage) TagBuiltImage(ctx context.Context, name string) error
func (StageImage) UnsetInspect ¶
func (i StageImage) UnsetInspect()
type StageImageBuilderContainer ¶
type StageImageBuilderContainer struct {
// contains filtered or unexported fields
}
func (*StageImageBuilderContainer) AddEnv ¶
func (c *StageImageBuilderContainer) AddEnv(envs map[string]string)
func (*StageImageBuilderContainer) AddExpose ¶
func (c *StageImageBuilderContainer) AddExpose(exposes ...string)
func (*StageImageBuilderContainer) AddLabel ¶
func (c *StageImageBuilderContainer) AddLabel(labels map[string]string)
func (*StageImageBuilderContainer) AddRunCommands ¶
func (c *StageImageBuilderContainer) AddRunCommands(commands ...string)
func (*StageImageBuilderContainer) AddServiceRunCommands ¶
func (c *StageImageBuilderContainer) AddServiceRunCommands(commands ...string)
func (*StageImageBuilderContainer) AddVolume ¶
func (c *StageImageBuilderContainer) AddVolume(volumes ...string)
func (*StageImageBuilderContainer) AddVolumeFrom ¶
func (c *StageImageBuilderContainer) AddVolumeFrom(volumesFrom ...string)
type StageImageContainer ¶
type StageImageContainer struct {
// contains filtered or unexported fields
}
func (*StageImageContainer) AddRunCommands ¶
func (c *StageImageContainer) AddRunCommands(commands ...string)
func (*StageImageContainer) AddServiceRunCommands ¶
func (c *StageImageContainer) AddServiceRunCommands(commands ...string)
func (*StageImageContainer) CommitChangeOptions ¶
func (c *StageImageContainer) CommitChangeOptions() ContainerOptions
func (*StageImageContainer) Name ¶
func (c *StageImageContainer) Name() string
func (*StageImageContainer) RunOptions ¶
func (c *StageImageContainer) RunOptions() ContainerOptions
func (*StageImageContainer) ServiceCommitChangeOptions ¶
func (c *StageImageContainer) ServiceCommitChangeOptions() ContainerOptions
func (*StageImageContainer) UserCommitChanges ¶
func (c *StageImageContainer) UserCommitChanges() []string
func (*StageImageContainer) UserRunCommands ¶
func (c *StageImageContainer) UserRunCommands() []string
type StageImageContainerOptions ¶
type StageImageContainerOptions struct { Volume []string VolumesFrom []string Expose []string Env map[string]string Label map[string]string Cmd string Workdir string User string Entrypoint string HealthCheck string }
func (*StageImageContainerOptions) AddCmd ¶
func (co *StageImageContainerOptions) AddCmd(cmd string)
func (*StageImageContainerOptions) AddEntrypoint ¶
func (co *StageImageContainerOptions) AddEntrypoint(entrypoint string)
func (*StageImageContainerOptions) AddEnv ¶
func (co *StageImageContainerOptions) AddEnv(envs map[string]string)
func (*StageImageContainerOptions) AddExpose ¶
func (co *StageImageContainerOptions) AddExpose(exposes ...string)
func (*StageImageContainerOptions) AddHealthCheck ¶
func (co *StageImageContainerOptions) AddHealthCheck(check string)
func (*StageImageContainerOptions) AddLabel ¶
func (co *StageImageContainerOptions) AddLabel(labels map[string]string)
func (*StageImageContainerOptions) AddUser ¶
func (co *StageImageContainerOptions) AddUser(user string)
func (*StageImageContainerOptions) AddVolume ¶
func (co *StageImageContainerOptions) AddVolume(volumes ...string)
func (*StageImageContainerOptions) AddVolumeFrom ¶
func (co *StageImageContainerOptions) AddVolumeFrom(volumesFrom ...string)
func (*StageImageContainerOptions) AddWorkdir ¶
func (co *StageImageContainerOptions) AddWorkdir(workdir string)
type WerfImage ¶
type WerfImage struct {
*StageImage
}
func NewWerfImage ¶
func NewWerfImage(fromImage *StageImage, name string, localDockerServerRuntime *LocalDockerServerRuntime) *WerfImage
func (WerfImage) GetStageDescription ¶
func (i WerfImage) GetStageDescription() *image.StageDescription
func (WerfImage) IsExistsLocally ¶
func (i WerfImage) IsExistsLocally() bool
func (WerfImage) SetInspect ¶
func (i WerfImage) SetInspect(inspect *types.ImageInspect)
func (WerfImage) SetStageDescription ¶
func (i WerfImage) SetStageDescription(stageDesc *image.StageDescription)
func (WerfImage) UnsetInspect ¶
func (i WerfImage) UnsetInspect()
Click to show internal directories.
Click to hide internal directories.