0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows 11, Rancher Desktop, pytest, testcontainersで 'docker.errors.DockerException' が発生した時の解決備忘録

0
Posted at

以下のエラーが発生。

docker.errors.DockerException: Error while fetching server API version: HTTPConnectionPool(host='127.0.0.1', port=53664): Max retries exceeded with url: /version (Caused by NewConnectionError("HTTPConnection(host='127.0.0.1', port=53664): Failed to establish a new connection: [WinError 10061] 対象のコンピューターによって拒否されたため、接続できませんでした。"))

原因

$env:USERPROFILE\.testcontainers.properties が以下のようになっていた。

testcontainers.reuse.enable = true
tc.host = tcp://127.0.0.1:53664
docker.host = tcp://127.0.0.1:53664

解決した方法

$env:USERPROFILE\.testcontainers.properties を以下のように変更するとエラーは発生しなくなった。

testcontainers.reuse.enable = true
docker.host=npipe:////./pipe/docker_engine
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?