public AuthConfig lookupAuthConfig(DockerImageName dockerImageName, AuthConfig defaultAuthConfig) {
        final String registryName = effectiveRegistryName(dockerImageName);
        log.debug("Looking up auth config for image: {} at registry: {}", dockerImageName, registryName);

        final Optional<AuthConfig> cachedAuth = cache.computeIfAbsent(
            registryName,
            __ -> lookupUncachedAuthConfig(registryName, dockerImageName)
        );

        if (cachedAuth.isPresent()) {
            log.debug("Cached auth found: [{}]", AuthConfigUtil.toSafeString(cachedAuth.get()));
            return cachedAuth.get();
        } else {
            log.debug(
                "No matching Auth Configs - falling back to defaultAuthConfig [{}]",
                AuthConfigUtil.toSafeString(defaultAuthConfig)
            );
            // otherwise, defaultAuthConfig should already contain any credentials available
            return defaultAuthConfig;
        }
    }
Looks up an AuthConfig for a given image name.
<p>
Lookup is performed in following order, as per
https://docs.docker.com/engine/reference/commandline/cli/:
<ol>
    <li>{@code credHelpers}</li>
    <li>{@code credsStore}</li>
    <li>Hard-coded Base64 encoded auth in {@code auths}</li>
    <li>otherwise, if no credentials have been found then behaviour falls back to docker-java's
    implementation</li>
</ol>

@param dockerImageName image name to be looked up (potentially including a registry URL part)
@param defaultAuthConfig an AuthConfig object that should be returned if there is no overriding authentication available for images that are looked up
@return an AuthConfig that is applicable to this specific image OR the defaultAuthConfig.
core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java