Reputation:
I have two linux docker containers: * ContainerA - tomcat image - running a java app * ContainerB - ubuntu image - execution of shell script runs a CLI linux application
ContainerA doesn't have busybox hence can't run the shell script, and needs to be seperated from the linux app due to large filesize - hence two docker containers.
I'm trying to call from ContainerA the shell script which in ContainerB, but can't access it.
Upvotes: 0
Views: 48
Reputation: 2174
As I've already pointed out in the comments, this is something you won't find a simple OOTB Docker solution for. Containers usually talk to each other via networking protocols (HTTP) and are therefore not so different from actual, spatially divided machines. So, you would need an API on your container B that returns the resource that you want to the requesting end (container A in your case). APIs can be built in numerous ways; I've already mentioned Flask for Python. Jersey seems to be a similar framework for Java.
Implementing this is not done in a breeze, but I don't see how to approach this in another way, besides rethinking your setup as a whole.
Upvotes: 1