testcontainers / testcontainers/testcontainers-java
DockerClientConfigUtils#getDefaultGateway() is failing with syslog driver
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 8.7k
- Forks
- 1.9k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 9
Description
Hello guys,
I'm trying to use testcontainers-java (which I like a lot) and I can't make it work in my CI infrastructure.
The reason of the failure is because I'm running my tests inside docker and the docker logging driver is configured to syslog.
For what I understood, this code is trying to read the log to get the output of a command to get the gateway ip and it's failing because getting the log is not supported by syslog.
Therefore the gateway ip address can not be determined and the library can not properly manage containers.
I'm getting the following error in the logs of my build:
10:11:34.252 [tc-okhttp-stream-247575268] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"configured logging reader does not support reading"}
It looks like an issue to me as the library can not be used with such configuration. I'd like to have your thoughts on that and eventually know if there could be any workaround I could use.
Thank in advance !
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez dans core/src/main/java/org/testcontainers/dockerclient/DockerClientConfigUtils.java, au niveau de getDefaultGateway(), puis reproduisez l'échec avec le syslog logging driver de Docker. Suivez la manière dont la sortie de la commande et la gateway IP sont obtenues, et vérifiez que Testcontainers peut déterminer la gateway sans l'erreur de logging-reader non pris en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, java
- Domaine
- devops, testing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100