Documentation
¶
Index ¶
Constants ¶
View Source
const ( IndexDockerIO = "https://index.docker.io/v1/" DockerRegistry = "docker.io" )
Variables ¶
This section is empty.
Functions ¶
func ResolveRegistryHost ¶
ResolveRegistryHost can be used to transform a docker registry host name into what is used for the docker config/cred helpers
This is useful for using with containerd authorizers. Naturally this only transforms docker hub URLs.
Types ¶
type ImageReference ¶
type ImageReference struct {
// Registry is the registry hostname (e.g., "docker.io", "myregistry.com:5000")
Registry string
// Repository is the image repository (e.g., "library/nginx", "user/image")
Repository string
// Tag is the image tag (e.g., "latest", "v1.0.0")
Tag string
// Digest is the image digest if present (e.g., "sha256:...")
Digest string
}
ImageReference represents a parsed Docker image reference
func ParseImageRef ¶
func ParseImageRef(imageRef string) (ImageReference, error)
ParseImageRef extracts the registry from the image name, using github.com/distribution/reference as a reference parser, and returns the ImageReference struct.
Click to show internal directories.
Click to hide internal directories.