Class ImageReference

java.lang.Object
io.quarkus.container.spi.ImageReference

public class ImageReference extends Object
This is basically a simplified version of com.google.cloud.tools.jib.api.ImageReference
  • Field Details

  • Method Details

    • isValidRegistry

      public static boolean isValidRegistry(String registry)
      Returns true if registry is a valid registry string. For example, a valid registry could be gcr.io or localhost:5000.
      Parameters:
      registry - the registry to check
      Returns:
      true if is a valid registry; false otherwise
    • isValidRepository

      public static boolean isValidRepository(String repository)
      Returns true if repository is a valid repository string. For example, a valid repository could be distroless or my/container-image/repository.
      Parameters:
      repository - the repository to check
      Returns:
      true if is a valid repository; false otherwise
    • isValidTag

      public static boolean isValidTag(String tag)
      Returns true if tag is a valid tag string. For example, a valid tag could be v120.5-release.
      Parameters:
      tag - the tag to check
      Returns:
      true if is a valid tag; false otherwise
    • parse

      public static ImageReference parse(String reference)
      Parses a string reference into an ImageReference.

      Image references should generally be in the form: <registry>/<repository>:<tag> For example, an image reference could be gcr.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 tag on that page.

      Parameters:
      reference - the string to parse
      Returns:
      an ImageReference parsed from the string
      Throws:
      IllegalArgumentException - if reference is formatted incorrectly
    • getRegistry

      public Optional<String> getRegistry()
    • getEffectiveRegistry

      public String getEffectiveRegistry()
    • getRepository

      public String getRepository()
    • getTag

      public String getTag()
    • getDigest

      public String getDigest()