Connect several Docker Containers and execute commands inside containers

I would like to run a Python Tool (Volatility) in a Docker Container and execute commands inside the container to receive the output in a Java application. The problem is that Volatility needs Python to execute commands, how do I connect Python with the tool running in docker and get the output of the command in a Java application?
Is it possible to get the command output of a docker container on the host?