private AuthConfig findExistingAuthConfig(final JsonNode config, final String reposName) throws Exception {
        final Map.Entry<String, JsonNode> entry = findAuthNode(config, reposName);

        if (entry != null && entry.getValue() != null && entry.getValue().size() > 0) {
            final AuthConfig deserializedAuth = OBJECT_MAPPER
                .treeToValue(entry.getValue(), AuthConfig.class)
                .withRegistryAddress(entry.getKey());

            if (
                StringUtils.isBlank(deserializedAuth.getUsername()) &&
                StringUtils.isBlank(deserializedAuth.getPassword()) &&
                !StringUtils.isBlank(deserializedAuth.getAuth())
            ) {
                final String rawAuth = new String(Base64.getDecoder().decode(deserializedAuth.getAuth()));
                final String[] splitRawAuth = rawAuth.split(":", 2);

                if (splitRawAuth.length == 2) {
                    deserializedAuth.withUsername(splitRawAuth[0]);
                    deserializedAuth.withPassword(splitRawAuth[1]);
                }
            }

            return deserializedAuth;
        }
        return null;
    }
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