Browse Source

Align credential helper logic with Docker CLI

See gh-45269
pull/45286/head
Phillip Webb 11 months ago
parent
commit
79f7529efd
  1. 3
      spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java

3
spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/DockerRegistryConfigAuthentication.java

@ -133,8 +133,7 @@ class DockerRegistryConfigAuthentication implements DockerRegistryAuthentication @@ -133,8 +133,7 @@ class DockerRegistryConfigAuthentication implements DockerRegistryAuthentication
}
private CredentialHelper getCredentialHelper(String serverUrl) {
String name = this.dockerConfig.getCredHelpers().get(serverUrl);
name = (StringUtils.hasText(name)) ? name : this.dockerConfig.getCredsStore();
String name = this.dockerConfig.getCredHelpers().getOrDefault(serverUrl, this.dockerConfig.getCredsStore());
return (name != null) ? this.credentialHelperFactory.apply(name.trim()) : null;
}

Loading…
Cancel
Save