以下のエラーが発生。
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