def start(self):
        # On OS X, shared volumes must be in /Users, so use the home directory.
        # See 'Mount a host directory as a data volume' at
        # https://docs.docker.com/userguide/dockervolumes/
        self.tmpdir = tempfile.mkdtemp(dir=os.path.expanduser('~'))
        try:
            self.docker.pull(self.image)
            container = self.docker.create_container(
                image=self.image, command='/bin/bash', tty=True,
                volumes=['/mnt/script'],
            )
            self.container_id = container[u'Id']
            self.docker.start(
                self.container_id,
                binds={
                    self.tmpdir: {'bind': '/mnt/script', 'ro': True},
                }
            )
        except:
            os.rmdir(self.tmpdir)
            raise
Start the Docker container.
dataset/ETHPy150Open ClusterHQ/flocker/admin/client.py/DockerContainer.start