Don't attach stdin and stdout when in detach mode
This is primarily to make it work with Swarm, which checks that
AttachStd{in,out,err} is false when creating containers.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
200c44cff3
commit
e89826fe43
5 changed files with 34 additions and 6 deletions
|
|
@ -332,6 +332,14 @@ class ServiceTest(DockerClientTestCase):
|
|||
service = self.create_service('web')
|
||||
service.scale(1)
|
||||
self.assertEqual(len(service.containers()), 1)
|
||||
|
||||
# Ensure containers don't have stdout or stdin connected
|
||||
container = service.containers()[0]
|
||||
config = container.inspect()['Config']
|
||||
self.assertFalse(config['AttachStderr'])
|
||||
self.assertFalse(config['AttachStdout'])
|
||||
self.assertFalse(config['AttachStdin'])
|
||||
|
||||
service.scale(3)
|
||||
self.assertEqual(len(service.containers()), 3)
|
||||
service.scale(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue