Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Problem with authentication when downloading test containers from Docker Hub #514

Open
gaurav opened this issue May 17, 2022 · 1 comment

Comments

@gaurav
Copy link
Member

gaurav commented May 17, 2022

When running sbt IntegrationTest/test, I ran into an odd error when starting the test container:

[info]   com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"Head \"https://registry-1.docker.io/v2/testcontainers/ryuk/manifests/0.3.3\": unauthorized: incorrect username or password"}
[info]   
[info]   	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
[info]   	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
[info]   	at java.base/java.lang.Thread.run(Thread.java:833)

[...]
[info]   Fiber:Id(1652816139436,942) execution trace:
[...]
[info]     at org.renci.cam.it.TestContainer$.camkpapi(TestContainer.scala:15)

I was able to temporarily work around this problem by installing this Docker package manually (by running docker -D pull testcontainers/ryuk:0.3.3). I also found a more permanent workaround discussed at testcontainers/testcontainers-java#5121 (comment): logging into index.docker.io specifically by running: docker login index.docker.io.

I'm guessing I ran into this problem because my Docker instance was misconfigured somehow, but I wanted to document this here in case anybody else sees this problem. If nobody else complains about it, I'll close this issue, but we can reopen if the problem recurs.

@EdMass
Copy link

EdMass commented Jun 3, 2022

I had the same problem and your post save me, thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants