docker

package
v0.0.0-...-f6121d7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrManifestV2Required = errors.New("image manifest must of v2 format")
)

Functions

func GetLabels

func GetLabels(hub *reg.Registry, ref ImageRef, mf interface{}) (map[string]string, error)

GetLabels returns the labels of docker image. The image name should how it is presented to a Kubernetes container. If image is found it returns tuple {labels, err=nil}, otherwise it returns tuple {label=nil, err}

func MakeDockerKeyring

func MakeDockerKeyring(pullSecrets []v1.Secret) (credentialprovider.DockerKeyring, error)

func PullManifest

func PullManifest(ref ImageRef, keyring credentialprovider.DockerKeyring) (*reg.Registry, *dockertypes.AuthConfig, interface{}, error)

PullManifest pulls an image manifest (v2 or v1) from remote registry using the supplied secrets if necessary. ref: https://github.com/kubernetes/kubernetes/blob/release-1.9/pkg/kubelet/kuberuntime/kuberuntime_image.go#L29

Types

type ImageRef

type ImageRef struct {
	RepoToPull  string
	Tag         string
	Digest      string
	RegistryURL string
	Repository  string
}

func ParseImageName

func ParseImageName(image string) (ref ImageRef, err error)

func (ImageRef) Ref

func (i ImageRef) Ref() string

func (ImageRef) String

func (i ImageRef) String() string

Jump to

Keyboard shortcuts

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