@Nullable
  AuthTemplate getAuthFor(String registry) {
    Map.Entry<String, AuthTemplate> authEntry =
        findFirstInMapByKey(dockerConfigTemplate.getAuths(), getRegistryMatchersFor(registry));
    return authEntry != null ? authEntry.getValue() : null;
  }
Returns the base64-encoded {@code Basic} authorization for {@code registry}, or {@code null} if
none exists. The order of lookup preference:

<ol>
  <li>Exact registry name
  <li>https:// + registry name
  <li>registry name + / + arbitrary suffix
  <li>https:// + registry name + / arbitrary suffix
</ol>

@param registry the registry to get the authorization for
@return the base64-encoded {@code Basic} authorization for {@code registry}, or {@code null} if
    none exists
jib-core/src/main/java/com/google/cloud/tools/jib/registry/credentials/DockerConfig.java