mirror of https://github.com/docker/docker-py.git
Allow user=0 to be passed in create_container
Signed-off-by: Anthony Sottile <asottile@umich.edu>
This commit is contained in:
parent
64a1d8c69a
commit
3c9738a584
|
@ -578,7 +578,7 @@ class ContainerConfig(dict):
|
|||
'Hostname': hostname,
|
||||
'Domainname': domainname,
|
||||
'ExposedPorts': ports,
|
||||
'User': six.text_type(user) if user else None,
|
||||
'User': six.text_type(user) if user is not None else None,
|
||||
'Tty': tty,
|
||||
'OpenStdin': stdin_open,
|
||||
'StdinOnce': stdin_once,
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
from docker.types.containers import ContainerConfig
|
||||
|
||||
|
||||
def test_uid_0_is_not_elided():
|
||||
x = ContainerConfig(image='i', version='v', command='true', user=0)
|
||||
assert x['User'] == '0'
|
Loading…
Reference in New Issue