[Bug]: Can't overwrite Docker socket path with 2.0.2 / Podman stopped working
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
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker, java, postgresql
- Lĩnh vực
- databases, devops, testing-qa
Hướng nghiên cứu
Bắt đầu từ DockerClientFactory và các mục UnixSocketClientProviderStrategy và DockerDesktopClientProviderStrategy được hiển thị trong log. Tái hiện bài kiểm thử tích hợp PostgreSQL với DOCKER_HOST và TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE được thiết lập, sau đó truy vết lý do socket Podman bị bỏ qua. Hoàn thành khi Testcontainers 2.0.2 tôn trọng socket đã cấu hình và các bài kiểm thử tích hợp khởi chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Module
PostgreSQL
Testcontainers version
2.0.2
Using the latest Testcontainers version?
Yes
Host OS
Linux, Fedora 43
Host Arch
x86
Docker version
podman version
Client: Podman Engine
Version: 5.7.0
API Version: 5.7.0
Go Version: go1.25.4 X:nodwarf5
Git Commit: 0370128fc8dcae93533334324ef838db8f8da8cb
Built: Tue Nov 11 01:00:00 2025
Build Origin: Fedora Project
OS/Arch: linux/amd64
What happened?
Sorry if this is a duplicate, I wasn't able to find this issue.
I've been using Podman without any issues with the 1.x release series for years now following instructions like these. However it seems these environment variables are not respected anymore, because after upgrading some of our projects to Spring Boot 4 (which includes tc 2.0) I can't run integration tests anymore. Even after setting the following environment variables it still fails with the same message looking for /var/run/docker.sock, so something seems to be off:
DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
TESTCONTAINERS_RYUK_DISABLED=true
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=unix:///run/user/1000/podman/podman.sock
Relevant log output
13:53:24.585 [main] INFO org.testcontainers.images.PullPolicy - Image pull policy will be performed by: DefaultPullPolicy()
13:53:24.589 [main] INFO org.testcontainers.utility.ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
13:53:24.609 [main] INFO org.testcontainers.DockerClientFactory - Testcontainers version: 2.0.2
13:53:25.218 [main] INFO org.testcontainers.dockerclient.DockerMachineClientProviderStrategy - docker-machine executable was not found on PATH ([/usr/bin, /home/user/.jenv/libexec, /home/user/.sdkman/candidates/java/current/bin, /home/user/.jenv/shims, /home/user/.local/bin, /home/user/bin, /usr/local/bin, /usr/bin, /bin, /usr/local/sbin, /usr/sbin, /sbin, /var/lib/snapd/snap/bin, /home/user/go/bin, /home/user/.jenv/bin, /home/user/.npm-global/bin, /opt/go/bin])
13:53:25.220 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.
See https://java.testcontainers.org/on_failure.html for more details.
Additional Information
The only "config" we use is this line in the application-testing.yaml:
spring:
datasource:
url: jdbc:tc:postgresql:17-alpine://hostname/database
- Ngôn ngữ chính
- Java
- Star
- 8.7k
- Fork
- 1.9k
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 9
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
-
type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
testcontainers/testcontainers-java#11997 · 1 bình luận ·
-
[Enhancement]: Document why singleton containers are required under Spring's test context caching Đ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 ·
-
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 ·
-
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 ·
-
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 ·
Tất cả issue của testcontainers/testcontainers-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
objectionary/hone-maven-plugin#1061 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
spring-projects/spring-modulith#1895 ·