Use Container.create to recreate containers

self.create_container might do unexpected things.
This commit is contained in:
Ben Firshman 2014-01-20 16:10:54 +00:00
parent 24a6d1d836
commit 7e2d86c510
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()