image

package module
v0.61.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package image provides utilities to handle container images for pkg/util/containers

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyImage is returned when image name argument is empty
	ErrEmptyImage = errors.New("empty image name")
	// ErrImageIsSha256 is returned when image name argument is a sha256
	ErrImageIsSha256 = errors.New("invalid image name (is a sha256)")
)

Functions

func SanitizeHostPath added in v0.60.0

func SanitizeHostPath(path string) string

SanitizeHostPath changes the specified path by prepending the mount point of the host's filesystem

func SplitImageName

func SplitImageName(image string) (string, string, string, string, error)

SplitImageName splits a valid image name (from ResolveImageName) and returns:

  • the "long image name" with registry and prefix, without tag
  • the registry
  • the "short image name", without registry, prefix nor tag
  • the image tag if present
  • an error if parsing failed

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL