|
|
|
@ -844,14 +844,14 @@ class TaskParameters(DockerBaseClass):
|
|
|
|
if ':' in vol:
|
|
|
|
if ':' in vol:
|
|
|
|
if len(vol.split(':')) == 3:
|
|
|
|
if len(vol.split(':')) == 3:
|
|
|
|
host, container, mode = vol.split(':')
|
|
|
|
host, container, mode = vol.split(':')
|
|
|
|
if re.match(r'[\.~]', host):
|
|
|
|
if re.match(r'[.~]', host):
|
|
|
|
host = os.path.abspath(host)
|
|
|
|
host = os.path.abspath(os.path.expanduser(host))
|
|
|
|
new_vols.append("%s:%s:%s" % (host, container, mode))
|
|
|
|
new_vols.append("%s:%s:%s" % (host, container, mode))
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
elif len(vol.split(':')) == 2:
|
|
|
|
elif len(vol.split(':')) == 2:
|
|
|
|
parts = vol.split(':')
|
|
|
|
parts = vol.split(':')
|
|
|
|
if parts[1] not in VOLUME_PERMISSIONS and re.match(r'[\.~]', parts[0]):
|
|
|
|
if parts[1] not in VOLUME_PERMISSIONS and re.match(r'[.~]', parts[0]):
|
|
|
|
host = os.path.abspath(parts[0])
|
|
|
|
host = os.path.abspath(os.path.expanduser(parts[0]))
|
|
|
|
new_vols.append("%s:%s:rw" % (host, parts[1]))
|
|
|
|
new_vols.append("%s:%s:rw" % (host, parts[1]))
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
new_vols.append(vol)
|
|
|
|
new_vols.append(vol)
|
|
|
|
|