You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When digging a little, I found out that test containers embeds docker-java 3.2.0, and the classes are not shaded. So It conflicts with my production code using docker-java 3.2.2.
It seems that this getInstance method was added in docker-java 3.2.2 (others are deprecated).
As a workaround, I stick with docker-java 3.2.0, and a transport-okhttp for now, but still, this issue could help someone else :)
The text was updated successfully, but these errors were encountered:
First of all, thanks for upgrading to the latest version of docker-java and especially for trying the zerodep (aka Apache HttpClient5) transport! :)
There is indeed an issue when both libraries are used. The history of it is full of hard decisions, where docker-java's set of dependencies was so hard to have that we decided to re-shade it and include into Testcontainers' jar.
The good news is that we worked with the docker-java team and extracted the API module, so the next release of Testcontainers will finally stop including docker-java-api classes 🎉
Expect it (1.15.0 release) to happen soon, and I hope the workaround worked fine for now.
Actually, I think you can even use 3.2.2, but, instead of calling getInstance(config, transport), you can replace it with getInstance(config).withDockerCmdExecFactory(new OkHttpDockerCmdExecFactory()), or even zerodep + DefaultDockerCmdExecFactory. These are deprecated but fully working methods (disclaimer: I am the current maintainer of docker-java)
Hi there !
First, thank you for the great work. I use testcontainers since a few months, and it's great !
I have an issue in one of my app using :
This kind of code raises a
NoSuchMethodErrorwhen executed in an integration test :When digging a little, I found out that test containers embeds docker-java 3.2.0, and the classes are not shaded. So It conflicts with my production code using docker-java 3.2.2.
It seems that this
getInstancemethod was added in docker-java 3.2.2 (others are deprecated).As a workaround, I stick with docker-java 3.2.0, and a transport-okhttp for now, but still, this issue could help someone else :)
The text was updated successfully, but these errors were encountered: