mirror of https://github.com/docker/docker-py.git
Merge pull request #753 from docker/715-user-int-uid
Always send a string for the user param in create_container
This commit is contained in:
commit
de5aab87b4
|
@ -719,7 +719,7 @@ def create_container_config(
|
|||
'Hostname': hostname,
|
||||
'Domainname': domainname,
|
||||
'ExposedPorts': ports,
|
||||
'User': user,
|
||||
'User': six.text_type(user) if user else None,
|
||||
'Tty': tty,
|
||||
'OpenStdin': stdin_open,
|
||||
'StdinOnce': stdin_once,
|
||||
|
|
|
@ -1621,3 +1621,9 @@ class TestRegressions(BaseTestCase):
|
|||
ctnr = self.client.create_container('busybox', ['sleep', '2'])
|
||||
self.client.start(ctnr)
|
||||
self.client.stop(ctnr)
|
||||
|
||||
def test_715(self):
|
||||
ctnr = self.client.create_container('busybox', ['id', '-u'], user=1000)
|
||||
self.client.start(ctnr)
|
||||
self.client.wait(ctnr)
|
||||
assert self.client.logs(ctnr) == '1000\n'
|
||||
|
|
Loading…
Reference in New Issue