Always send a string for the user param in create_container

This commit is contained in:
Joffrey F 2015-08-31 16:06:52 -07:00
parent 33acb9d2e0
commit 09defa66ba
2 changed files with 4 additions and 1 deletions

View File

@ -715,7 +715,7 @@ def create_container_config(
'Hostname': hostname,
'Domainname': domainname,
'ExposedPorts': ports,
'User': user,
'User': '{0}'.format(user) if user else None,
'Tty': tty,
'OpenStdin': stdin_open,
'StdinOnce': stdin_once,

View File

@ -1624,3 +1624,6 @@ class TestRegressions(BaseTestCase):
ctnr = self.client.create_container('busybox', ['sleep', '2'])
self.client.start(ctnr)
self.client.stop(ctnr)
def test_715(self):
self.client.create_container('busybox', 'true', user=1000)