mirror of https://github.com/docker/docs.git
Merge pull request #191 from orchardup/fix-one-off-containers-not-linking-to-service
Fix one-off containers not linking to service
This commit is contained in:
commit
d7e01a23f8
|
@ -227,11 +227,11 @@ class TopLevelCommand(Command):
|
||||||
}
|
}
|
||||||
container = service.create_container(one_off=True, **container_options)
|
container = service.create_container(one_off=True, **container_options)
|
||||||
if options['-d']:
|
if options['-d']:
|
||||||
service.start_container(container, ports=None)
|
service.start_container(container, ports=None, one_off=True)
|
||||||
print(container.name)
|
print(container.name)
|
||||||
else:
|
else:
|
||||||
with self._attach_to_container(container.id, raw=tty) as c:
|
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()
|
c.run()
|
||||||
if options['--rm']:
|
if options['--rm']:
|
||||||
container.wait()
|
container.wait()
|
||||||
|
|
Loading…
Reference in New Issue