testcontainers / testcontainers/testcontainers-java
DockerClientConfigUtils#getDefaultGateway() is failing with syslog driver
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 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 !
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in core/src/main/java/org/testcontainers/dockerclient/DockerClientConfigUtils.java at getDefaultGateway(), then reproduce the failure with Docker's syslog logging driver. Trace how the command output and gateway IP are obtained, and verify that Testcontainers can determine the gateway without the unsupported logging-reader error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100