testcontainers / testcontainers/testcontainers-java

[Bug]: the newcomer example immediately turns into troubleshooting

オープン
#7,785 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

client/docker-for-windows os/windows type/bug
主要言語
Java
スター
8.7k
フォーク
1.9k
平均マージ
2日 17時間
マージ済み PR(30日)
9

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

getting-started-with-testcontainers-for-java ガイドとリンク先の on_failure ドキュメントから始め、報告された logs を使って Windows Docker Desktop のセットアップを再現します。例が有効な Docker 環境を見つけられない理由を追跡します。newcomer example が正常に実行されるか、ガイドに不足している前提条件と troubleshooting の手順が明確に記載されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, java, postgresql
領域
devops, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。