Testcontainers-java: [Windows] Can't pull ryuk image if quay.io is not reachable

Created on 5 Nov 2018  Â·  12Comments  Â·  Source: testcontainers/testcontainers-java

Hi,

I checked out the repository and define version as 1.9.1 before trying to run DemoControllerTest on my Windows machine, behind a corporate proxy. We use an internal repos for images. I enabled DEBUG logs to get more details :

2018-11-05 09:12:16.338  INFO   --- [           main] o.t.d.DockerClientProviderStrategy       : Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine)
2018-11-05 09:12:16.340  INFO   --- [           main] org.testcontainers.DockerClientFactory   : Docker host IP address is localhost
2018-11-05 09:12:16.344 DEBUG   --- [           main] c.g.d.core.command.AbstrDockerCmd        : Cmd: com.github.dockerjava.core.exec.InfoCmdExec@4b5189ac
2018-11-05 09:12:16.743 DEBUG   --- [           main] c.g.d.core.command.AbstrDockerCmd        : Cmd: com.github.dockerjava.core.exec.VersionCmdExec@5be46f9d
2018-11-05 09:12:16.751  INFO   --- [           main] org.testcontainers.DockerClientFactory   : Connected to docker: 
  Server Version: 18.03.1-ce
  API Version: 1.37
  Operating System: Docker for Windows
  Total Memory: 1980 MB
2018-11-05 09:12:16.757 DEBUG   --- [           main] c.g.d.core.command.AbstrDockerCmd        : Cmd: ListImagesCmdImpl[imageNameFilter=quay.io/testcontainers/ryuk:0.2.2,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder@0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec@600b90df]
2018-11-05 09:12:16.970 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : Looking up auth config for image: quay.io/testcontainers/ryuk:0.2.2
2018-11-05 09:12:16.971 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : RegistryAuthLocator has configFile: C:\Users\vincent\.docker\config.json (exists) and commandPathPrefix: 
2018-11-05 09:12:16.976 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : registryName [quay.io] for dockerImageName [quay.io/testcontainers/ryuk:0.2.2]
2018-11-05 09:12:16.977 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : Executing docker credential provider: docker-credential-wincred to locate auth config for: quay.io
2018-11-05 09:12:16.991 DEBUG   --- [           main] o.t.s.o.z.exec.ProcessExecutor           : Executing [docker-credential-wincred, get].
2018-11-05 09:12:17.015 DEBUG   --- [           main] o.t.s.o.z.exec.ProcessExecutor           : Started java.lang.ProcessImpl@4b40f651
2018-11-05 09:12:17.098 DEBUG   --- [ssImpl@4b40f651] o.t.s.o.z.exec.WaitForProcess            : java.lang.ProcessImpl@4b40f651 stopped with exit code 1
2018-11-05 09:12:17.101 DEBUG   --- [           main] o.t.s.o.z.exec.ProcessExecutor           : Executing [docker-credential-wincred, get].
2018-11-05 09:12:17.112 DEBUG   --- [           main] o.t.s.o.z.exec.ProcessExecutor           : Started java.lang.ProcessImpl@2f62ea70
2018-11-05 09:12:17.178 DEBUG   --- [ssImpl@2f62ea70] o.t.s.o.z.exec.WaitForProcess            : java.lang.ProcessImpl@2f62ea70 stopped with exit code 1
2018-11-05 09:12:17.178 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : Got credentials not found error message from docker credential helper - credentials not found in native keychain
2018-11-05 09:12:17.179  INFO   --- [           main] o.t.utility.RegistryAuthLocator          : Credentials not found for host (quay.io) when using credential helper/store (docker-credential-wincred)
2018-11-05 09:12:17.180 DEBUG   --- [           main] o.t.utility.RegistryAuthLocator          : no matching Auth Configs - falling back to defaultAuthConfig [null]
2018-11-05 09:12:17.180 DEBUG   --- [           main] o.t.d.a.AuthDelegatingDockerClientConfig : Effective auth config [null]

Process finished with exit code -1

In C:\Users\vincent\.dockerconfig.json , this is what I have :

{
    "auths": {
        "OUR_CORPORATE_DTR_URL": {}
    },
    "HttpHeaders": {
        "User-Agent": "Docker-Client/18.03.1-ce (windows)"
    },
    "credsStore": "wincred"
}

I know fairly little about Docker, so I am not able to make sense of the error message. It's very likely that ryuk image is not available in OUR_CORPORATE_DTR_URL.. but is it really the problem ? or is it a credentials config issue on my machine ?

Note : Windows documentation is out of date and would need to be updated (#756 has been released for instance). Once I understand better how it works, I can give it a try !

cliendocker-for-windows owindows resolutioacknowledged typquestion

Most helpful comment

quay.io is having issues:
https://status.quay.io/incidents/kw2627bsdwd9

From what i understand, some images like Ryuk are being retrieved from quay.io instead of from hub.docker.com. The question is, how can we force it to use hub.docker.com (or internal docker registry) exclusively?

I understand we can setup image versions in testcontainers.properties, but I don't see Ryuk being published to the docker hub.

All 12 comments

Hi Vincent,

Are this really all logs? There are some problems with cred lookup, but the
image we are looking for does not need creds.

The proxy environment might indeed the culprit, since we need to pull our
sidecar ryuk image from quay.io.

Vincent Fuchs notifications@github.com schrieb am Mo., 5. Nov. 2018,
07:17:

Hi,

I checked out the repository and define version as 1.9.1 before trying to
run DemoControllerTest on my Windows machine, behind a corporate proxy. We
use an internal repos for images. I enabled DEBUG logs to get more details :

2018-11-05 09:12:16.338 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine)
2018-11-05 09:12:16.340 INFO --- [ main] org.testcontainers.DockerClientFactory : Docker host IP address is localhost
2018-11-05 09:12:16.344 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.InfoCmdExec@4b5189ac
2018-11-05 09:12:16.743 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.VersionCmdExec@5be46f9d
2018-11-05 09:12:16.751 INFO --- [ main] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 18.03.1-ce
API Version: 1.37
Operating System: Docker for Windows
Total Memory: 1980 MB
2018-11-05 09:12:16.757 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: ListImagesCmdImpl[imageNameFilter=quay.io/testcontainers/ryuk:0.2.2,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder@0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec@600b90df]
2018-11-05 09:12:16.970 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Looking up auth config for image: quay.io/testcontainers/ryuk:0.2.2
2018-11-05 http://quay.io/testcontainers/ryuk:0.2.22018-11-05 09:12:16.971 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : RegistryAuthLocator has configFile: C:\Users\vincent.dockerconfig.json (exists) and commandPathPrefix:
2018-11-05 09:12:16.976 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : registryName [quay.io] for dockerImageName [quay.io/testcontainers/ryuk:0.2.2]
2018-11-05 09:12:16.977 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Executing docker credential provider: docker-credential-wincred to locate auth config for: quay.io
2018-11-05 09:12:16.991 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2018-11-05 09:12:17.015 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@4b40f651
2018-11-05 09:12:17.098 DEBUG --- [ssImpl@4b40f651] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@4b40f651 stopped with exit code 1
2018-11-05 09:12:17.101 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2018-11-05 09:12:17.112 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@2f62ea70
2018-11-05 09:12:17.178 DEBUG --- [ssImpl@2f62ea70] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@2f62ea70 stopped with exit code 1
2018-11-05 09:12:17.178 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Got credentials not found error message from docker credential helper - credentials not found in native keychain
2018-11-05 09:12:17.179 INFO --- [ main] o.t.utility.RegistryAuthLocator : Credentials not found for host (quay.io) when using credential helper/store (docker-credential-wincred)
2018-11-05 09:12:17.180 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : no matching Auth Configs - falling back to defaultAuthConfig [null]
2018-11-05 09:12:17.180 DEBUG --- [ main] o.t.d.a.AuthDelegatingDockerClientConfig : Effective auth config [null]

Process finished with exit code -1

In C:\Users\vincent.dockerconfig.json , this is what I have :

{
"auths": {
"OUR_CORPORATE_DTR_URL": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.03.1-ce (windows)"
},
"credsStore": "wincred"
}

I know fairly little about Docker, so I am not able to make sense of the
error message. It's very likely that ryuk image is not available in
OUR_CORPORATE_DTR_URL.. but is it really the problem ? or is it a
credentials config issue on my machine ?

Note : Windows documentation
https://www.testcontainers.org/usage/windows_support.html is out of
date and would need to be updated (#756
https://github.com/testcontainers/testcontainers-java/issues/756 has
been released for instance). Once I understand better how it works, I can
give it a try !

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/testcontainers/testcontainers-java/issues/951, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AE2jaOvsLRBHKmo4xdARtlYLr5fJaFKeks5ur9fogaJpZM4YN1XG
.

yes these are all the logs I got in the test, after setting everything to DEBUG level :



I have modified AbstractIntegrationTest to mention the proxy details :

@ClassRule
public static GenericContainer redis = new GenericContainer("redis:3.0.6")
.withExposedPorts(6379)
.withEnv("HTTP_PROXY", "http://user:password@proxy:8080")
.withEnv("HTTPS_PROXY", "https://user:password@proxy:8080");

(for proxy, I put the same value as I have in my git config to access github.com, so it should be good)

the test fails with below error (there's a 6min45s wait before that line :

2018-11-05 14:17:15.778 ERROR   --- [ream-1804126860] c.g.d.core.async.ResultCallbackTemplate  : Error during callback

com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}

    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:279)
    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$1(OkHttpInvocationBuilder.java:295)
    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder$$Lambda$76/1014794348.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)


java.lang.ExceptionInInitializerError
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1082)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:1063)
    at java.lang.reflect.Field.get(Field.java:387)
    at org.junit.runners.model.FrameworkField.get(FrameworkField.java:73)
    at org.junit.runners.model.TestClass.getAnnotatedFieldValues(TestClass.java:230)
    at org.junit.runners.ParentRunner.classRules(ParentRunner.java:255)
    at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:244)
    at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}

    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:279)
    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$1(OkHttpInvocationBuilder.java:295)
    at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder$$Lambda$76/1014794348.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

.. which indeed seems to point at a proxy issue. If I were able to get the ryuk image in my local docker images store, then it wouldn't try to fetch it from quay.io, right ?

To be honest, I have no experience with Docker in proxy environments with a mirrored Docker registry.
So in theory it should work if you get the image into your mirror, I just don't have any experience with this, sorry.

I have to check, if we still try to pull the ryuk image if it already exists on the Docker host.

Stacktrace on windows 10 with junit-jupiter 1.10.5
"RegistryAuthLocator - Credentials not found for host (quay.io) when using credential helper/store"

[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Will use 'okhttp' transport
[main] INFO org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy - Accessing docker with local Npipe socket (npipe:////./pipe/docker_engine)
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine)
[main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost
[main] INFO org.testcontainers.DockerClientFactory - Connected to docker:
Server Version: 18.09.1
API Version: 1.39
Operating System: Docker Desktop
Total Memory: 6442 MB
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credentials not found for host (quay.io) when using credential helper/store (docker-credential-wincred)
[tc-okhttp-stream-2088371948] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}

at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:276)
at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$1(OkHttpInvocationBuilder.java:292)
at java.lang.Thread.run(Thread.java:748)

I have the same problem. Maybe there is a simple solution?
````
2019-05-21 17:14:20.828 DEBUG --- [ main] o.t.utility.TestcontainersConfiguration : Testcontainers configuration overrides will be loaded from file:/C:/Users/Stefan%20Dehnert/.testcontainers.properties
2019-05-21 17:14:20.837 DEBUG --- [ main] o.t.utility.TestcontainersConfiguration : Testcontainers configuration overrides loaded from TestcontainersConfiguration(properties={docker.client.strategy=org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy})
2019-05-21 17:14:20.872 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Loaded org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2019-05-21 17:14:20.926 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Will use 'okhttp' transport
2019-05-21 17:14:21.675 DEBUG --- [ ducttape-0] o.t.d.DockerClientProviderStrategy : Pinging docker daemon...
2019-05-21 17:14:21.840 DEBUG --- [ ducttape-0] c.g.d.core.command.AbstrDockerCmd : Cmd: org.testcontainers.dockerclient.transport.okhttp.OkHttpDockerCmdExecFactory$1@47a07f0b
2019-05-21 17:14:21.898 INFO --- [ main] o.t.d.NpipeSocketClientProviderStrategy : Accessing docker with local Npipe socket (npipe:////./pipe/docker_engine)
2019-05-21 17:14:21.899 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine)
2019-05-21 17:14:21.900 INFO --- [ main] org.testcontainers.DockerClientFactory : Docker host IP address is localhost
2019-05-21 17:14:21.903 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.InfoCmdExec@63376bed
2019-05-21 17:14:22.033 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.VersionCmdExec@f68f0dc
2019-05-21 17:14:22.040 INFO --- [ main] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 18.09.2
API Version: 1.39
Operating System: Docker for Windows
Total Memory: 1980 MB
2019-05-21 17:14:22.044 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: ListImagesCmdImpl[imageNameFilter=quay.io/testcontainers/ryuk:0.2.3,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder@0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec@29f7cefd]
2019-05-21 17:14:22.075 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Looking up auth config for image: quay.io/testcontainers/ryuk:0.2.3
2019-05-21 17:14:22.075 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : RegistryAuthLocator has configFile: C:\Users\Stefan Dehnert.dockerconfig.json (exists) and commandPathPrefix:
2019-05-21 17:14:22.079 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : registryName [quay.io] for dockerImageName [quay.io/testcontainers/ryuk:0.2.3]
2019-05-21 17:14:22.080 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Executing docker credential provider: docker-credential-wincred to locate auth config for: quay.io
2019-05-21 17:14:22.088 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2019-05-21 17:14:22.096 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@72d6b3ba
2019-05-21 17:14:22.133 DEBUG --- [ssImpl@72d6b3ba] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@72d6b3ba stopped with exit code 1
2019-05-21 17:14:22.136 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2019-05-21 17:14:22.145 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@51bd8b5c
2019-05-21 17:14:22.189 DEBUG --- [ssImpl@51bd8b5c] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@51bd8b5c stopped with exit code 1
2019-05-21 17:14:22.189 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Got credentials not found error message from docker credential helper - credentials not found in native keychain
2019-05-21 17:14:22.190 INFO --- [ main] o.t.utility.RegistryAuthLocator : Credentials not found for host (quay.io) when using credential helper/store (docker-credential-wincred)
2019-05-21 17:14:22.190 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : no matching Auth Configs - falling back to defaultAuthConfig [null]
2019-05-21 17:14:22.191 DEBUG --- [ main] o.t.d.a.AuthDelegatingDockerClientConfig : Effective auth config [null]
2019-05-21 17:15:37.214 ERROR --- [ream-1052317717] c.g.d.core.async.ResultCallbackTemplate : Error during callback

com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}

at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:276)
at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$1(OkHttpInvocationBuilder.java:292)
at java.lang.Thread.run(Thread.java:748)

````

if i disable ryuk vial TESTCONTAINERS_RYUK_DISABLED=true
````
2019-05-21 17:34:11.368 DEBUG --- [ main] o.t.utility.TestcontainersConfiguration : Testcontainers configuration overrides will be loaded from file:/C:/Users/Stefan%20Dehnert/.testcontainers.properties
2019-05-21 17:34:11.379 DEBUG --- [ main] o.t.utility.TestcontainersConfiguration : Testcontainers configuration overrides loaded from TestcontainersConfiguration(properties={docker.client.strategy=org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy})
2019-05-21 17:34:11.420 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Loaded org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2019-05-21 17:34:11.478 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Will use 'okhttp' transport
2019-05-21 17:34:12.218 DEBUG --- [ ducttape-0] o.t.d.DockerClientProviderStrategy : Pinging docker daemon...
2019-05-21 17:34:12.379 DEBUG --- [ ducttape-0] c.g.d.core.command.AbstrDockerCmd : Cmd: org.testcontainers.dockerclient.transport.okhttp.OkHttpDockerCmdExecFactory$1@e775c5
2019-05-21 17:34:12.438 INFO --- [ main] o.t.d.NpipeSocketClientProviderStrategy : Accessing docker with local Npipe socket (npipe:////./pipe/docker_engine)
2019-05-21 17:34:12.438 INFO --- [ main] o.t.d.DockerClientProviderStrategy : Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine)
2019-05-21 17:34:12.440 INFO --- [ main] org.testcontainers.DockerClientFactory : Docker host IP address is localhost
2019-05-21 17:34:12.443 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.InfoCmdExec@63376bed
2019-05-21 17:34:12.556 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: com.github.dockerjava.core.exec.VersionCmdExec@f68f0dc
2019-05-21 17:34:12.562 INFO --- [ main] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 18.09.2
API Version: 1.39
Operating System: Docker for Windows
Total Memory: 1980 MB
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
2019-05-21 17:34:12.570 DEBUG --- [ main] c.g.d.core.command.AbstrDockerCmd : Cmd: ListImagesCmdImpl[imageNameFilter=alpine:3.5,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder@0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec@503f91c3]
2019-05-21 17:34:12.597 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Looking up auth config for image: alpine:3.5
2019-05-21 17:34:12.598 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : RegistryAuthLocator has configFile: C:\Users\Stefan Dehnert.dockerconfig.json (exists) and commandPathPrefix:
2019-05-21 17:34:12.602 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : registryName [index.docker.io] for dockerImageName [alpine:3.5]
2019-05-21 17:34:12.603 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Executing docker credential provider: docker-credential-wincred to locate auth config for: index.docker.io
2019-05-21 17:34:12.611 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2019-05-21 17:34:12.620 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@928763c
2019-05-21 17:34:12.657 DEBUG --- [essImpl@928763c] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@928763c stopped with exit code 1
2019-05-21 17:34:12.659 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Executing [docker-credential-wincred, get].
2019-05-21 17:34:12.667 DEBUG --- [ main] o.t.s.o.z.exec.ProcessExecutor : Started java.lang.ProcessImpl@2dc9b0f5
2019-05-21 17:34:12.709 DEBUG --- [ssImpl@2dc9b0f5] o.t.s.o.z.exec.WaitForProcess : java.lang.ProcessImpl@2dc9b0f5 stopped with exit code 1
2019-05-21 17:34:12.710 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : Got credentials not found error message from docker credential helper - credentials not found in native keychain
2019-05-21 17:34:12.710 INFO --- [ main] o.t.utility.RegistryAuthLocator : Credentials not found for host (index.docker.io) when using credential helper/store (docker-credential-wincred)
2019-05-21 17:34:12.712 DEBUG --- [ main] o.t.utility.RegistryAuthLocator : no matching Auth Configs - falling back to defaultAuthConfig [AuthConfig{username=null, password=blank, auth=blank, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}]
2019-05-21 17:34:12.713 DEBUG --- [ main] o.t.d.a.AuthDelegatingDockerClientConfig : Effective auth config [AuthConfig{username=null, password=blank, auth=blank, email=null, registryAddress=https://index.docker.io/v1/, registryToken=blank}]
2019-05-21 17:34:27.745 ERROR --- [ream-1345401730] c.g.d.core.async.ResultCallbackTemplate : Error during callback

com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}

at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.execute(OkHttpInvocationBuilder.java:276)
at org.testcontainers.dockerclient.transport.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$1(OkHttpInvocationBuilder.java:292)
at java.lang.Thread.run(Thread.java:748)

And the output of wincred:
PS C:\WINDOWSsystem32> docker-credential-wincred list
{"https://index.docker.io/v1/":"dbconn"}

I encountered the same issue and was able to use the intrinsic configuration mechanics of testcontainers to direct it to the corporate docker registry mirror by creating a file testcontainers.properties in src/test/resources (assuming a maven project structure) pointing to the artifactory mirror:

ryuk.container.image=artifactory.foo.bar.com/docker/testcontainers/ryuk:0.2.3

I get this error... why?

16:23:11.039 INFO  [ScalaTest-run       ] o.testcontainers.DockerClientFactory  Connected to docker: 
  Server Version: 18.09.2
  API Version: 1.39
  Operating System: Docker for Mac
  Total Memory: 1999 MB
16:23:14.962 INFO  [ScalaTest-run       ] o.t.utility.RegistryAuthLocator       Credential helper/store (docker-credential-osxkeychain) does not have credentials for quay.io

Hi, how can i add a new mirror in docker in testcontainers.

This is happening again.

quay.io is having issues:
https://status.quay.io/incidents/kw2627bsdwd9

From what i understand, some images like Ryuk are being retrieved from quay.io instead of from hub.docker.com. The question is, how can we force it to use hub.docker.com (or internal docker registry) exclusively?

I understand we can setup image versions in testcontainers.properties, but I don't see Ryuk being published to the docker hub.

@codegeek
this seems to be the corresponding image in docker-hub: testcontainersofficial/ryuk
unfortunately there is only a "latest" tag so changes could occur. But it should be a workaround for times quay.io is having trouble.

See #2763

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michael-simons picture michael-simons  Â·  3Comments

micheal-swiggs picture micheal-swiggs  Â·  4Comments

oneiros-de picture oneiros-de  Â·  3Comments

dabraham02124 picture dabraham02124  Â·  3Comments

chomhanks picture chomhanks  Â·  3Comments