testcontainers / testcontainers/testcontainers-java
[Bug]: the newcomer example immediately turns into troubleshooting
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 9
Descripción
Module
PostgreSQL
Testcontainers version
1.18.0
Using the latest Testcontainers version?
Yes
Host OS
Microsoft Windows [Version 10.0.19045.3570]
Host Arch
amd64
Docker version
Docker version 24.0.6, build ed223bc
What happened?
As a newcomer,
I installed docker Desktop for Windows.
Following https://testcontainers.com/guides/getting-started-with-testcontainers-for-java/ got error:
[INFO] -------------------------------------------------------
[INFO] Running com.testcontainers.demo.[1mCustomerServiceTest[m
15:14:48.055 [main] DEBUG org.testcontainers.utility.TestcontainersConfiguration -- Testcontainers configuration overrides will be loaded from file:/C:/Users/ppku/.testcontainers.properties
15:14:48.071 [main] WARN org.testcontainers.utility.TestcontainersConfiguration -- Attempted to read Testcontainers configuration file at file:/C:/Users/ppku/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: C:\Users\ppku\.testcontainers.properties (The system cannot find the file specified)
15:14:48.078 [main] INFO org.testcontainers.utility.ImageNameSubstitutor -- Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
15:14:48.335 [main] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy -- Trying out strategy: NpipeSocketClientProviderStrategy
15:14:48.335 [main] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy -- DOCKER_HOST socket file '//./pipe/docker_engine' does not exist
15:14:48.335 [main] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy -- strategy NpipeSocketClientProviderStrategy did not pass the test
15:14:48.335 [main] INFO org.testcontainers.dockerclient.DockerMachineClientProviderStrategy -- docker-machine executable was not found on PATH ([C:/app/eclipse-2022-09//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.4.v20220903-1038/jre/bin/server, C:/app/eclipse-2022-09//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.4.v20220903-1038/jre/bin, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0\, C:\WINDOWS\System32\OpenSSH\, C:\Program Files (x86)\Pulse Secure\VC142.CRT\X64\, C:\Program Files (x86)\Pulse Secure\VC142.CRT\X86\, C:\Program Files (x86)\Symantec\VIP Access Client\, C:\Program Files\Docker\Docker\resources\bin, C:\Users\ppku\AppData\Local\Microsoft\WindowsApps, C:\Users\ppku\AppData\Local\GitHubDesktop\bin, C:\app\Microsoft VS Code\bin, C:\app\node-v18.17.1-win-x64, , C:\app\eclipse-2022-09])
15:14:48.335 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -- Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
As no valid configuration was found, execution cannot continue.
See https://www.testcontainers.org/on_failure.html for more details.
Following the on failure link has not helped a lot.
There must be missing some trivial assumption. If I start PowerShell I get:
PS C:\Users\ppku> docker --version
Docker version 24.0.6, build ed223bc
so docker is on path.
Quite not understand why probing failed.
Could you investigate, pls?
Relevant log output
No response
Additional Information
No response
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la guía getting-started-with-testcontainers-for-java y la documentación enlazada de on_failure, y después reproduce la configuración de Windows Docker Desktop usando los logs indicados. Rastrea por qué el ejemplo no puede encontrar un entorno Docker válido; se considera terminado cuando el ejemplo de newcomer se ejecuta correctamente o la guía documenta claramente el prerrequisito que falta y el paso de troubleshooting.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, java, postgresql
- Área
- devops, testing
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100