testcontainers / testcontainers/testcontainers-java

[Bug]: the newcomer example immediately turns into troubleshooting

Offen
#7,785 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

client/docker-for-windows os/windows type/bug
Vorherrschende Sprache
Java
Sterne
8.7k
Forks
1.9k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
9

Beschreibung

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.CustomerServiceTest
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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Leitfaden getting-started-with-testcontainers-for-java und der verlinkten Dokumentation on_failure und reproduziere anschließend das Windows Docker Desktop-Setup anhand der gemeldeten Logs. Verfolge, warum das Beispiel keine gültige Docker-Umgebung finden kann; abgeschlossen ist die Aufgabe, wenn das Newcomer-Beispiel erfolgreich ausgeführt wird oder der Leitfaden die fehlende Voraussetzung und den Troubleshooting-Schritt klar dokumentiert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, java, postgresql
Bereich
devops, testing
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.