Fix one-off containers not linking to service

Closes #185.

Need to test this more thoroughly. We need a docker-py mock.
This commit is contained in:
Ben Firshman 2014-04-14 22:29:03 +01:00
parent 5061875fa9
commit 94e15a9985
1 changed files with 2 additions and 2 deletions

View File

@ -227,11 +227,11 @@ class TopLevelCommand(Command):
}
container = service.create_container(one_off=True, **container_options)
if options['-d']:
service.start_container(container, ports=None)
service.start_container(container, ports=None, one_off=True)
print(container.name)
else:
with self._attach_to_container(container.id, raw=tty) as c:
service.start_container(container, ports=None)
service.start_container(container, ports=None, one_off=True)
c.run()
if options['--rm']:
container.wait()