Kaydet (Commit) cbc7623e authored tarafından Anthony Sottile's avatar Anthony Sottile Kaydeden (comit) Joffrey F

Allow user=0 to be passed in create_container

Signed-off-by: 's avatarAnthony Sottile <asottile@umich.edu>
üst 8ee44663
......@@ -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,
......
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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment