Documentation ¶
Overview ¶
Package image contains methods and helpers for parsing the docker image format. Unfortunately, Docker's codebase does not provide a simple library for encoding/decoding the string representation of an image into a consistent structure.
The general format is:
NAME[:TAG|@DIGEST]
Example:
ubuntu:14.04 localhost.localdomain:5000/samalba/hipache:latest localhost:5000/foo/bar@sha256:bc8813ea7b3603864987522f02a76101c17ad122e1c46d790efc0fca78ca7bfb
Index ¶
Constants ¶
View Source
const DefaultTag = "latest"
DefaultTag is used when json decoding an image. If there is no tag part present, this will be used as the tag.
Variables ¶
View Source
var ErrInvalidImage = errors.New("image: invalid")
ErrInvalidImage is returned when the image does not specify a repo.
Functions ¶
Types ¶
type Image ¶
type Image struct { // Registry is the registry that the image belongs to. Registry string // Repository is the repository part of the image. Repository string // If provided a tag. Tag string // If provided, a digest for the image. Digest string }
Image represents all the information about an image.
func (*Image) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.