Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#11,254 8 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

  • #11255 par @WieczorekAdrian — fermée sans fusion

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
docker, java, postgresql

Piste de recherche

Commencez par DockerClientFactory et les entrées UnixSocketClientProviderStrategy et DockerDesktopClientProviderStrategy affichées dans le journal. Reproduisez le test d’intégration PostgreSQL avec DOCKER_HOST et TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE définis, puis cherchez pourquoi le socket Podman est ignoré. Le travail est terminé lorsque Testcontainers 2.0.2 prend en compte le socket configuré et que les tests d’intégration démarrent correctement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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
Langage dominant
Java
Étoiles
8.7k
Forks
1.9k
Merge moyen
20 h 43 min
PR mergées (30 j)
4

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de testcontainers/testcontainers-java

Toutes les issues de testcontainers/testcontainers-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.