'Run a Python script as a Docker container with the Flocker volume
driver.
This is a blocking call.
:param Cluster cluster: Description of the cluster we\'re talking to.
:param bytes address: The public IP of the node where it will run.
:param dict docker_arguments: Additional arguments to pass to
Docker ``create_container()`` call.
:param FilePath script: The script to run.
:param list script_arguments: Additional arguments to pass to the
script.
:param cleanup: If true, cleanup the container at test end.
:return: Container id, once the Docker container has started.'

def run_python_container(self, cluster, address, docker_arguments, script, script_arguments, cleanup=True, client=None):

    if (client is None):
        client = get_docker_client(cluster, address)
    for container in client.containers():
        client.remove_container(container['Id'], force=True)
    container = client.create_container('python:2.7-slim', (['python2.7', '-c', script.getContent()] + list(script_arguments)), volume_driver='flocker', **docker_arguments)
    cid = container['Id']
    client.start(container=cid)
    if cleanup:
        self.addCleanup(client.remove_container, cid, force=True)
    return cid
