registry

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByCoordinate

type ByCoordinate []Image

ByCoordinate allows you to sort registry.Image arrays.

func (ByCoordinate) Len

func (a ByCoordinate) Len() int

func (ByCoordinate) Less

func (a ByCoordinate) Less(i, j int) bool

func (ByCoordinate) Swap

func (a ByCoordinate) Swap(i, j int)

type Image

type Image struct {
	Registry string // Host AND port
	User     string
	Name     string
	Tag      string
}

Image represents the "coordinates" of a container image i.e.: REGISTRY[:PORT]/USER/NAME[:TAG] e.g.: - "quay.io/weaveworks/wksctl:latest" - "localhost:5000/test/busybox:v1.2.3" - "golang:1.10"

See also: - https://github.com/moby/moby/blob/master/image/spec/v1.2.md#terminology - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/recommended_practices_for_container_development/naming - https://success.docker.com/article/what-is-the-correct-format-to-name-and-tag-dtr-repositories

func NewImage

func NewImage(image string) (*Image, error)

NewImage parses the provided string representation of an image to return a registry.Image struct.

func (Image) CommandsToRetagAs

func (image Image) CommandsToRetagAs(destImage Image) []string

CommandsToRetagAs returns the docker pull, docker tag, and docker push commands required to "retag" this (source) container image under a different registry, user, name, and/or tag, as specified by the provided (destination) image.

func (Image) String

func (image Image) String() string

String returns the string representation of this Image struct.

Jump to

Keyboard shortcuts

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