testcontainers-java
testcontainers-java copied to clipboard
[Bug]: Incorrect server URL in RegistryAuthLocator#lookupAuthConfig when a credential helper doesn’t include the server URL in its response
Module
Core
Testcontainers version
1.20.0
Using the latest Testcontainers version?
Yes
Host OS
Linux, macOS
Host Arch
x86, ARM
Docker version
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.18.3
Git commit: 100c70180f
Built: Mon Jun 6 21:36:39 2022
OS/Arch: darwin/arm64
Context: default
Experimental: true
What happened?
Some credential helpers (like docker-credential-ecr-login) return the server URL for get, while others (like docker-credential-gcloud) don’t. For these helpers, the resulting AuthConfig contains the value of com.github.dockerjava.api.model.AuthConfig.DEFAULT_SERVER_ADDRESS.
We’d expect the RegistryAuthLocator to fall back to the server URL from the query, just like the logic in the first-party credential helper tool.
Relevant log output
No response
Additional Information
No response