I'm struggling to see the advantage of this? Surely either running the entire thing in the container and just running the command using subprocess would achieve the same effect....
That's totally true, but it means the python app can only run in the same container as the process. I thought there were essentially 2 really cool features of this: you don't have to clean up after your (sub)processes and your docker daemon could be running remotely. (e.g., you could distribute tasks to a bunch of servers running your containers)