Open abderrezakBoukazouha opened 3 months ago
We have the same issue.
EDIT: We had to workaround this with TESTCONTAINERS_RYUK_DISABLED=true.
I believe it's related to Jenkins not allowing containers to connect between them with Ip adresses. Most likely a networking issue
Module
Core
Testcontainers version
1.19.7
Using the latest Testcontainers version?
Yes
Host OS
CentOS Linux 7 (Core)
Host Arch
Linux 3.10.0-327.36.1.el7.x86_64
Docker version
What happened?
I'm Trying to run some tests with TestContainers inside a Jenkins pipeline, with those two command :
docker build -f Dockerfile-package-application -t build-container . --progress=plain --network=host
docker run -e TESTCONTAINERS_HOST_OVERRIDE=localhost --network=host -v /etc/passwd:/etc/passwd:ro --rm -v ${playlist_services_directory}:${playlist_services_directory} -w ${playlist_services_directory} -v /var/run/docker.sock:/var/run/docker.sock -t build-container
and the dockerfile has a basic
CMD ["mvn", "clean", "install" ]
--network=host
is for allowing the containers to upload the maven dependancies via a MirrorThe launch of the test in Intellij or in a docker (In Macbook pro M1) is very smooth and get the result I want, but not on Jenkins, where I receive those Logs, where ryuk tries a couple of times before it crashes. Note that I used different strategies like -e TESTCONTAINERS_HOST_OVERRIDE=host or -e TESTCONTAINERS_HOST_OVERRIDE=172.17.0.1 but the issue remains only on Jenkins. it a question of networking a believe and it's a real Struggle.
Relevant log output
Additional Information
Note : I'm not Able to reproduce this behaviour locally, my build and tests with the same command works perfectly No response