Package io.quarkus.container.spi
Class ImageReference
java.lang.Object
io.quarkus.container.spi.ImageReference
This is basically a simplified version of
com.google.cloud.tools.jib.api.ImageReference-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetTag()static booleanisValidRegistry(String registry) Returnstrueifregistryis a valid registry string.static booleanisValidRepository(String repository) Returnstrueifrepositoryis a valid repository string.static booleanisValidTag(String tag) Returnstrueiftagis a valid tag string.static ImageReferenceParses a stringreferenceinto anImageReference.
-
Field Details
-
DEFAULT_TAG
- See Also:
-
-
Method Details
-
isValidRegistry
Returnstrueifregistryis a valid registry string. For example, a valid registry could begcr.ioorlocalhost:5000.- Parameters:
registry- the registry to check- Returns:
trueif is a valid registry;falseotherwise
-
isValidRepository
Returnstrueifrepositoryis a valid repository string. For example, a valid repository could bedistrolessormy/container-image/repository.- Parameters:
repository- the repository to check- Returns:
trueif is a valid repository;falseotherwise
-
isValidTag
Returnstrueiftagis a valid tag string. For example, a valid tag could bev120.5-release.- Parameters:
tag- the tag to check- Returns:
trueif is a valid tag;falseotherwise
-
parse
Parses a stringreferenceinto anImageReference.Image references should generally be in the form:
<registry>/<repository>:<tag>For example, an image reference could begcr.io/distroless/java:debug.See https://docs.docker.com/engine/reference/commandline/tag/#extended-description for a description of valid image reference format. Note, however, that the image reference is referred confusingly as
tagon that page.- Parameters:
reference- the string to parse- Returns:
- an
ImageReferenceparsed from the string - Throws:
IllegalArgumentException- ifreferenceis formatted incorrectly
-
getRegistry
-
getEffectiveRegistry
-
getRepository
-
getTag
-
getDigest
-