Documentation ¶
Index ¶
- func SplitImageSpec(image string) (registry, repo, tag, label, ctx string)
- func SplitLabelContext(labelCtx string) (label, ctx string)
- func SplitRegistryRepo(regrepo string) (registry, repotag string)
- func SplitRepoTag(repotag string) (repo, tag string)
- func SplitTagLabel(taglabel string) (tag, label string)
- type List
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitImageSpec ¶
SplitImageSpec splits the given image specification into the various components of an ImageSpec
func SplitLabelContext ¶
SplitLabelContext splits labelCtx into Label and Context (the part after "@", see sepLabelContext)
FIXME: image@sha256:<sha256> is called image-by-digest. obviously this collides with the concept of "concept". either fix the concept / implementation of "a context" (which helps to remap the found container-images to the runnable entities they might refer to) OR detect a image-by-digest and ignore it coz we can't really compare such a digest against "newer"
func SplitRegistryRepo ¶
SplitRegistryRepo splits regrepo into registry and the repo, eg: "quay.io/project/repo" into "quay.io" and "project/repo"
func SplitRepoTag ¶
SplitRepoTag splits a string which contains a repo and a tag combination. SplitRepoTag("repo/image:tag-label") * repo: "repo/image" * tag: "tag-label"
func SplitTagLabel ¶
SplitTagLabel splits taglabel into tag and label, eg: 1.0-label into "1.0" and "label"
Types ¶
type Spec ¶
Spec describes a container image spec.
A container-image name is constructed from several pieces:
docker.io/library/alpine:1.13-rc0-amd64+12345 ^-+-----^ ^--+--^ ^--+-^ ^-+^ ^+------^ ^-+-^
| | | | | | +- registry| | | | | +- repository | | | | | |
····· semver ···································
| | | +- version | | | | | +- pre-release | | | +- build
····· other ····································
| +- label
relevant links:
- https://cloud.google.com/artifact-registry/docs/docker/names <project>/<repo>/<image>:<tag>
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/recommended_practices_for_container_development/naming <repository>:<tag>
* short names: https://github.com/containers/shortnames
func (*Spec) Normalize ¶
Normalize tries to transform a short image name into a normalized form A short image name is something like "alpine" which totally lacks the registry part.
func (*Spec) RegistryRepo ¶
RegistryRepo returns a string based upon the registry and the repo component of spec
func (*Spec) StripContext ¶
StripContext removes the context component of spec. The function returns a new ImageSpec