Merge pull request #36 from orchardup/use-container-create-for-recreating-containers

Use Container.create to recreate containers
This commit is contained in:
Aanand Prasad 2014-01-20 09:59:02 -08:00
commit f47f075f02
1 changed files with 7 additions and 8 deletions

View File

@ -141,14 +141,13 @@ class Service(object):
if container.is_running:
container.stop(timeout=1)
intermediate_container_options = {
'image': container.image,
'command': 'echo',
'volumes_from': container.id,
'entrypoint': None
}
intermediate_container = self.create_container(
one_off=True, **intermediate_container_options)
intermediate_container = Container.create(
self.client,
image=container.image,
command='echo',
volumes_from=container.id,
entrypoint=None
)
intermediate_container.start()
intermediate_container.wait()
container.remove()