I am having two docker containers. Lets call them container 1 and container 2. I can install stuff in only one of those. I have to run a jar file in container 1 in which I am not permitted to install anything. As such I install java in container 2 and then use
docker run --volumes-from container2 <all files need to run java from container 2>:<path in container 1> and then run the jar in container 1.
Can I Somehow do this ?
I am thinking of making a folder on container 2 and installing all java stuff in that particular folder and then mounting it all into container 1 and exporting JAVA_HOME but am not sure if that is possible.
TIA