Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: Can't overwrite Docker socket path with 2.0.2 / Podman stopped working

Abierto
#11,254 8 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #11255 de @WieczorekAdrian — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
docker, java, postgresql

Línea de trabajo

Empieza por DockerClientFactory y las entradas UnixSocketClientProviderStrategy y DockerDesktopClientProviderStrategy que aparecen en el registro. Reproduce la prueba de integración de PostgreSQL con DOCKER_HOST y TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE establecidos y, después, rastrea por qué se ignora el socket de Podman. Se considera terminado cuando Testcontainers 2.0.2 respeta el socket configurado y las pruebas de integración se inician correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

type/bug
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
Lenguaje dominante
Java
Estrellas
8.7k
Forks
1.9k
Merge medio
20 h 43 min
PR fusionados (30 d)
4

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de testcontainers/testcontainers-java

Todos los issues de testcontainers/testcontainers-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.