Repository Tags
Container repository tags are textual labels associated with a repository.
Relaxed Rules
Package Origin does not enforce strict formatting rules on tags.
Semantic Versions
Package Origin prefers versions for tags.
Package Origin parses and sorts tags as semantic versions. There are limits to this approach but the imposed structure benefits software distribution more than it harms.
A good tag conveys useful information to the customer. A collection of tags should be coherent and convey a structure.
A collection of well formed tags might be:
latest
2.1.0-preview.1
2.0.1
2.0.0
2.0.0-preview.2
2.0.0-preview.1
1.0.2
1.0.1
1.0.0
This collection follows the norm of including a latest
tag, which presumably points to 2.0.1
as the latest non-prerelease version. The remaining tags are ordered by their relative version and the format suggests orderly progression between releases.
Automatic Tags
Package Origin will automatically include a latest
tag when none is present. Other automatic tags are available but not enabled by default; see the include repository tags flags.
The intended behaviour is to remove the need for you to manage the these special tags. You should be able to build your software, added the latest version to Package Origin, and let Package Origin deal with the specifics of being a Container Registry.
Latest Tag
The latest
tag should be used for the most recent stable version of a repository.
To automatically add the latest
tag, an existing tag is selected and a copy of that tag becomes latest
; the selected tag is unaffected and the repository is unaffected. The derived tag is temporary and is not stored.
The selected tag is the tag representing the highest non-prerelease version of the repository.
Edge Cases
If every tag is a prerelease, the highest version of all the tags becomes latest
. This covers the period before a stable version is released and ensures latest
exists. Customers pulling the latest
tag at this time, will get the latest prerelease and later transition to only non-prerelease versions.
If every tag fails to parse as a version, latest
will not be included. Package Origin can not determine an order of unstructured tags.
Why latest
?
The need for a latest
tag is promoted by Docker’s use of the tag as a default. If the tag is omitted from a docker
command line call, the tag latest
is used.
Prerelease Tag
The prerelease
tag should be used for the most recent stable or unstable version of a repository.
By default, the prerelease
tag is not automatically added.
To automatically add the prerelease
tag, an existing tag is selected and a copy of that tag becomes prerelease
; the selected tag is unaffected and the repository is unaffected. The derived tag is temporary and is not stored.
The selected tag is the tag representing the highest version of the repository. If the highest version is stable, prerelease
will point to this stable version.
The intended behaviour is to ensure customers who pull from the prerelease
tag always have the more recent version of the repository – even if it is a prerelease version and may not be considered suitable for general deployment.
Why prerelease
?
Prerelease is the term used by the semantic versions specification. The term is not widely used for Containers but its meaning is unambiguous and thus preferable to alternatives such as edge
, nightly
, and unstable
.