testcontainers-java: docker-credential-osxkeychain error on OS X
Getting this error with TestContainer 1.9.1 (reproduced on 1.9.0 as well)
2018-10-15 11:18:43.097 [main] ERROR o.t.s.o.z.exec.ProcessExecutor - - Could not start process:
java.io.IOException: Cannot run program "docker-credential-osxkeychain": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor.invokeStart(ProcessExecutor.java:1016)
at org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor.startInternal(ProcessExecutor.java:989)
at org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:925)
at org.testcontainers.utility.RegistryAuthLocator.runCredentialProgram(RegistryAuthLocator.java:323)
at org.testcontainers.utility.RegistryAuthLocator.runCredentialProvider(RegistryAuthLocator.java:219)
at org.testcontainers.utility.RegistryAuthLocator.authConfigUsingStore(RegistryAuthLocator.java:186)
at org.testcontainers.utility.RegistryAuthLocator.lookupAuthConfig(RegistryAuthLocator.java:120)
...
when revert back to 1.8.3 version - everything starts working again and I don’t see this error anymore.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 18 (8 by maintainers)
I also had this issue with 1.9.1 and reverting to 1.8.3 suppressed the error. After some more digging, i saw in my .docker/config.json i had two entries for the cred store, but the type-case was different: { “credSstore” : “”, “HttpHeaders” : { “User-Agent” : “Docker-Client/18.06.1-ce (darwin)” }, “credsStore” : “osxkeychain” } After enabling and disabling the osx key chain from the docker UI (for mac) i saw that “credsStore” wasn’t being used. Removing it from my config (manually) also stopped the error from showing up.
Not sure if this is a docker issue or a testcontainers issue… either way this resolved the Exception for me.
@cschneider I investigated the behaviour of docker desktop:
Securely store Docker logins in macOS keychain->"credSstore":"osxkeychain"automatically created by docker desktop, then I checkedKeychain Access, searched for docker, I was able to see newly created credentials. Run integration tests -> all ok"credSstore":"", docker desktop also remove docker credentials fromKeychain Access. Run integration tests -> all ok"credSstore":""from.docker/config.json. Run integration tests -> all okI think this issue relates to docker desktop application, not testcontainers. some screenshots:

I solved it by remove credsstore
@NikitaZhevnitskiy good investigation - that
"credSstore"is bizarre! Maybe worth reporting this over in https://github.com/docker/for-mac ?I’m going to close this ticket now that we’re releasing a workaround, but if this problem recurs in any way from 1.11.0 onwards please open a new issue and link this one.