mirror of https://github.com/docker/docker-py.git
Relaxed checking of userns_mode
When using docker-compose in combination with rootless podman containers it is desirable to use the keep-id user namespace mapping. By lifting the restriction to 'host' the userns_mode config can now be used with podman to supply the keep-id or more complex configurations. Signed-off-by: Jonathan Hettwer (bauen1) <j2468h@gmail.com>
This commit is contained in:
parent
bd164f928a
commit
2cebb82f68
|
|
@ -544,8 +544,13 @@ class HostConfig(dict):
|
|||
if version_lt(version, '1.23'):
|
||||
raise host_config_version_error('userns_mode', '1.23')
|
||||
|
||||
if userns_mode != "host":
|
||||
raise host_config_value_error("userns_mode", userns_mode)
|
||||
# Do not check that userns_mode has a specific value, i.e. 'host'
|
||||
# since more complex values might be supported by the daemon exposing
|
||||
# the docker api, e.g. podman also supports 'keep-id'
|
||||
|
||||
if not isinstance(userns_mode, str):
|
||||
raise host_config_type_error('userns_mode', userns_mode, 'string')
|
||||
|
||||
self['UsernsMode'] = userns_mode
|
||||
|
||||
if uts_mode:
|
||||
|
|
|
|||
Loading…
Reference in New Issue