testcontainers / testcontainers/testcontainers-java
[Bug]: the newcomer example immediately turns into troubleshooting
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 8.7k
- Forks
- 1.9k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 9
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le guide getting-started-with-testcontainers-for-java et la documentation on_failure liée, puis reproduisez la configuration de Windows Docker Desktop à partir des logs signalés. Déterminez pourquoi l’exemple ne trouve pas d’environnement Docker valide ; le travail est terminé lorsque l’exemple newcomer s’exécute correctement ou que le guide documente clairement le prérequis manquant et l’étape de troubleshooting.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, java, postgresql
- Domaine
- devops, testing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100