Our recent move to a jenkins in a docker-image has not been so smooth.
We have a (over?)complicated setup where one docker container starts a new one and, previously, shared data with the new container by sharing host-folders.
In essence we have Jenkins running in docker and building java projects. One of these projects will fire up several Testcontainers, transfer a jar from a project to a container which will in turn start a new container and share this jar through a volume. The setup works on a local machine where jenkins is not involved (thus no "outer" docker layer).
On our build server everything seems to go fine, the jar file is found on the "jobexecutor" but cannot be run using standard java -jar ourFile.jar
failing with a "unable to access jarfile".
The docker socket is shared all the way through and the mountablefile is verified to exist on the "jobcontroller" image with the right size, and 777 permission. It is also found on the jobexecutor.
Debugging is painstakingly slow/hard as this only occurs on the build server and not locally.
Ideas? Or is this simply too complicated for a DinD scenario?