public static boolean isValidRegistry(String registry) {
    return registry.matches(REGISTRY_REGEX);
  }
Returns {@code true} if {@code registry} is a valid registry string. For example, a valid
registry could be {@code gcr.io} or {@code localhost:5000}.

@param registry the registry to check
@return {@code true} if is a valid registry; {@code false} otherwise
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java