Skip to content

Cannot pull images when logged in to Docker Desktop (Status 500: unauthorized: incorrect username or password) #5121

Closed
@MH-17

Description

Test Containers 1.16.3 on Docker Engine 20.10.12 with Docker Desktop using WSL2 Backend on Windows 21H1.

When I am logged in to my account in Docker Desktop, Test Containers can no longer pull images from Docker Hub. Once I log out of my account, Test Containers is able to pull images as expected.

com.github.dockerjava.api.async.ResultCallbackTemplate - Error during callback
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"}
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
	at java.base/java.lang.Thread.run(Thread.java:833)

I think my Docker installation is fine, as I can pull images from the terminal when I am logged in to Docker Desktop. I don't want to log out every time I use Test Containers. How can I fix this issue?

Logs (on INFO): https://pastebin.com/fyExxi76

Logs (on DEBUG): https://pastebin.com/b4H283fL

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions