public class ContainerImageParser
extends Object
- https://docs.docker.com/engine/reference/commandline/tag/#extended-description
An image name is made up of slash-separated name components, optionally prefixed by a registry hostname.
The hostname must comply with standard DNS rules, BUT MAY NOT CONTAIN UNDERSCORES. If a hostname is present,
it may optionally be followed by a port number in the format :8080. If not present, the command uses Docker’s
public registry located at registry-1.docker.io by default.
Name components may contain lowercase letters, digits and separators. A separator is defined as a period, one or
two underscores, or one or more dashes. A name component may not start or end with a separator.
A tag name must be valid ASCII and may contain lowercase and uppercase letters, digits, underscores, periods
and dashes. A tag name may not start with a period or a dash and may contain a maximum of 128 characters.
- https://github.com/docker/docker.github.io/blob/master/docker-hub/repos.md#creating-repositories
The repository name needs to be unique in that namespace, can be two to 255 characters, and can only contain
lowercase letters, numbers or - and _
- https://docs.docker.com/registry/spec/api/#overview
1. A repository name is broken up into path components. A component of a repository name must be at least one
lowercase, alpha-numeric characters, optionally separated by periods, dashes or underscores. More strictly,
it must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*.
2. If a repository name has two or more path components, they must be separated by a forward slash (“/”).
3. The total length of a repository name, including slashes, must be less than 256 characters.
- Heuristic logic implemented by Docker to detect domain part in repository name:
https://github.com/docker/distribution/blob/master/reference/normalize.go#L91
- Author:
- Christian Tzolov