Documentation ¶
Index ¶
Constants ¶
const ( ResolvedDockerhubHost = "index.docker.io/" // Images such as "busybox" reside in the dockerhub "library" repository // The full resolved image reference would be index.docker.io/library/busybox DockerhubPublicRepository = "library/" )
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
Compile attempts to normalize the glob and turn it into a regular expression that we can use for matching image names.
func Match ¶
Match will return true if the image reference matches the requested glob pattern.
If the image reference is invalid, an error will be returned.
In the glob pattern, the "*" character matches any non-"/" character, and "**" matches any character, including "/".
If the image is a DockerHub official image like "ubuntu" or "debian", the glob that matches it must be something like index.docker.io/library/ubuntu. If the image is a DockerHub used-owned image like "myuser/myapp", then the glob that matches it must be something like index.docker.io/myuser/myapp. This means that the glob patterns "*" will not match the image name "ubuntu", and "*/*" will not match "myuser/myapp"; the "index.docker.io" prefix is required.
If the image does not specify a tag (e.g., :latest or :v1.2.3), the tag ":latest" will be assumed.
Note that the tag delimiter (":") does not act as a breaking separator for the purposes of a "*" glob. To match any tag, the glob should end with ":**".
Types ¶
This section is empty.