Documentation
¶
Overview ¶
Package images handles container image management operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerImageManager ¶
type DockerImageManager struct {
// contains filtered or unexported fields
}
DockerImageManager implements the ImageManager interface for Docker, or compatible runtimes such as Podman.
func NewDockerImageManager ¶
func NewDockerImageManager(dockerClient *client.Client) *DockerImageManager
NewDockerImageManager creates a new DockerImageManager instance This is intended for the Docker runtime implementation.
func (*DockerImageManager) BuildImage ¶
func (d *DockerImageManager) BuildImage(ctx context.Context, contextDir, imageName string) error
BuildImage builds a Docker image from a Dockerfile in the specified context directory
func (*DockerImageManager) ImageExists ¶
ImageExists checks if an image exists locally
type ImageManager ¶
type ImageManager interface {
// ImageExists checks if an image exists locally
ImageExists(ctx context.Context, image string) (bool, error)
// PullImage pulls an image from a registry
PullImage(ctx context.Context, image string) error
// BuildImage builds a Docker image from a Dockerfile in the specified context directory
BuildImage(ctx context.Context, contextDir, imageName string) error
}
ImageManager defines the interface for managing container images. It has been extracted from the runtime interface as part of ongoing refactoring. It may be merged into a more general container management interface in future.
func NewImageManager ¶
func NewImageManager(ctx context.Context) ImageManager
NewImageManager creates an instance of ImageManager appropriate for the current environment, or returns an error if it is not supported.
type NoopImageManager ¶
type NoopImageManager struct{}
NoopImageManager is a no-op implementation of ImageManager.
func (*NoopImageManager) BuildImage ¶
func (*NoopImageManager) BuildImage(_ context.Context, _, _ string) error
BuildImage does nothing for the no-op implementation.
func (*NoopImageManager) ImageExists ¶
ImageExists always returns false for the no-op implementation.