mirror of https://github.com/docker/docker-py.git
Fix the way the list of mounts is made for service.
Signed-off-by: Antoine Verlant <antoine@niboo.be>
This commit is contained in:
parent
f127a9ffdc
commit
933a303ede
|
|
@ -107,11 +107,14 @@ class ContainerSpec(dict):
|
||||||
if labels is not None:
|
if labels is not None:
|
||||||
self['Labels'] = labels
|
self['Labels'] = labels
|
||||||
if mounts is not None:
|
if mounts is not None:
|
||||||
|
parsed_mounts = []
|
||||||
for mount in mounts:
|
for mount in mounts:
|
||||||
if isinstance(mount, six.string_types):
|
if isinstance(mount, six.string_types):
|
||||||
mounts.append(Mount.parse_mount_string(mount))
|
parsed_mounts.append(Mount.parse_mount_string(mount))
|
||||||
mounts.remove(mount)
|
else:
|
||||||
self['Mounts'] = mounts
|
# If mount already parsed
|
||||||
|
parsed_mounts.append(mount)
|
||||||
|
self['Mounts'] = parsed_mounts
|
||||||
if stop_grace_period is not None:
|
if stop_grace_period is not None:
|
||||||
self['StopGracePeriod'] = stop_grace_period
|
self['StopGracePeriod'] = stop_grace_period
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue