[Bug]: Docker communication error using DOCKER_HOST localhost (1.17+)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với DockerClientProviderStrategy và DockerMachineClientProviderStrategy, sử dụng hành vi được báo cáo của DOCKER_HOST tcp://localhost:2375 làm trường hợp tái hiện. So sánh Testcontainers 1.16.3 với 1.17.0 và các phiên bản mới hơn trên Windows 11 với WSL2. Được xem là hoàn tất khi giao tiếp Docker dựa trên localhost hoạt động trở lại mà không yêu cầu IP eth0 của WSL, với kiểm thử hồi quy cho thiết lập được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Module
Core
Testcontainers version
1.19.8
Using the latest Testcontainers version?
Yes
Host OS
Windows 11
Host Arch
AMD64
Docker version
Client: Docker Engine - Community
Version: 24.0.7
API version: 1.43
Go version: go1.20.10
Git commit: afdd53b
Built: Thu Oct 26 09:08:01 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.20.10
Git commit: 311b9ff
Built: Thu Oct 26 09:08:01 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.25
GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc:
Version: 1.1.10
GitCommit: v1.1.10-0-g18a0cb0
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What happened?
When I start my Junit tests in IntelliJ, it is failing and logging :
2024-06-12T11:04:16.067+02:00 WARN --- [ main] o.t.d.DockerClientProviderStrategy : DOCKER_HOST tcp://localhost:2375 is not listening
2024-06-12T11:04:16.099+02:00 INFO --- [ main] .t.d.DockerMachineClientProviderStrategy : docker-machine executable was not found on PATH ([C:\...])
2024-06-12T11:04:16.102+02:00 ERROR --- [ main] o.t.d.DockerClientProviderStrategy : Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
As no valid configuration was found, execution cannot continue.
I have configured my DOCKER_HOST with tcp://localhost:2375 and since testcontainers 1.17.0, it is no longer working as is.
I since changed my DOCKER_HOST replacing "localhost" with the WSL eth0 IP and it is working again, but I don't think it is a good solution.
I'm using WSL2, here is the WSL --version detail :
Version WSL : 2.1.5.0
Version du noyau : 5.15.146.1-2
Version WSLg : 1.0.60
Version MSRDC : 1.2.5105
Version direct3D : 1.611.1-81528511
Version de DXCore : 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Version de Windows : 10.0.22631.3593
This problem only occur since testcontainers 1.17.0 and later versions.
Testcontainers 1.16.3 (and older) works great.
My internet browser is accessing DOCKER through http://localhost:2375/ (or my WSL eth0 IP) perfectly.
Relevant log output
No response
Additional Information
No response
- Ngôn ngữ chính
- Java
- Star
- 8.8k
- Fork
- 2k
- Merge trung bình
- 5 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của testcontainers/testcontainers-java
-
[Bug]: withStartupTimeout() changes the startup timeout of all containers that use the default wait strategyCó thể đã có người làm @aymenjamaaoui đã nhận 1 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
testcontainers/testcontainers-java#12171 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement]: Document why singleton containers are required under Spring's test context cachingCó thể đã có người làm @zakaullah075 đã nhận 95 ngày trước. Đang mởtype/enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
testcontainers/testcontainers-java#11967 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Cannot reuse Selenium BrowserWebDriverContainers under LinuxCó thể đã có người làm @kdelay đã nhận 116 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
testcontainers/testcontainers-java#11941 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: DockerDesktopClientProviderStrategy is always applicableCó thể đã có người làm @seonwooj0810 đã nhận 165 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
testcontainers/testcontainers-java#11829 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement]: cleanup document after removing junit4 supportCó thể đã có người làm @SJvaca30 đã nhận 173 ngày trước. Đang mởtype/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
testcontainers/testcontainers-java#11578 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của testcontainers/testcontainers-java
Issue tương tự
-
Links broken in documentationĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
pact-foundation/pact-plugins#125 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
opencollab/flexdock#28 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
yegor256/jping#122 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
SAP/ai-sdk-java#1206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue insight-module
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
sdlc-pro/spring-lens#606 ·
Maintainer thường phản hồi trong vòng 1 ngày