testcontainers / testcontainers/testcontainers-java
[Bug]: Cant run tests on K8s 1.24 without docker CR
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Module
Core
Testcontainers version
1.18.2
Using the latest Testcontainers version?
Yes
Host OS
Ubuntu
Host Arch
x86
Docker version
Not using docker daemon, using containerd as K8s has stopped supported Docker as Container Runtime in 1.22
What happened?
We are using Jenkins on K8s and build our Java spring applications, now when we updated our K8s cluster to 1.24, and from 1.24 AWS EKS has stopped providing Docker as the container runtime rather supporting CRI. The issue is the pipelines stopped working when we updated it, as testcontainers was trying to use docker to create containers. I have also tried mounting /run/containerd/containerd.sock
Relevant log output
MyTest > my test FAILED
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:98
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
Caused by: org.springframework.beans.factory.BeanCreationException at ConstructorResolver.java:658
Caused by: org.springframework.beans.BeanInstantiationException at SimpleInstantiationStrategy.java:185
Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:231
Additional Information
No response
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 at DockerClientProviderStrategy.java:231 and reproduce the failure in a Jenkins environment running on Kubernetes 1.24 with containerd and no Docker daemon. Investigate the available container runtime connection described in the issue, then define and verify what support would let the Java tests create containers without Docker; the issue names no test file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java, kubernetes, spring
- Domain
- devops, infrastructure, testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100