@@ -36,21 +36,26 @@ def _get_docker_machine_mounts(): # type: () -> List[Text]
36
36
if 'DOCKER_MACHINE_NAME' not in os .environ :
37
37
__docker_machine_mounts = []
38
38
else :
39
- __docker_machine_mounts = [u'/' + line .split (None , 1 )[0 ]
40
- for line in subprocess .check_output (
41
- ['docker-machine' , 'ssh' ,
42
- os .environ ['DOCKER_MACHINE_NAME' ],
43
- 'mount' , '-t' , 'vboxsf' ],
44
- universal_newlines = True ).splitlines ()]
39
+ __docker_machine_mounts = [
40
+ u'/' + line .split (None , 1 )[0 ] for line in
41
+ subprocess .check_output (
42
+ ['docker-machine' , 'ssh' ,
43
+ os .environ ['DOCKER_MACHINE_NAME' ], 'mount' , '-t' ,
44
+ 'vboxsf' ],
45
+ universal_newlines = True ).splitlines ()]
45
46
return __docker_machine_mounts
46
47
47
48
def _check_docker_machine_path (path ): # type: (Optional[Text]) -> None
48
49
if not path :
49
50
return
51
+ if onWindows ():
52
+ path = path .lower ()
50
53
mounts = _get_docker_machine_mounts ()
51
54
if mounts :
52
55
found = False
53
56
for mount in mounts :
57
+ if onWindows ():
58
+ mount = mount .lower ()
54
59
if path .startswith (mount ):
55
60
found = True
56
61
break
@@ -59,9 +64,11 @@ def _check_docker_machine_path(path): # type: (Optional[Text]) -> None
59
64
"Input path {path} is not in the list of host paths mounted "
60
65
"into the Docker virtual machine named {name}. Already mounted "
61
66
"paths: {mounts}.\n "
62
- "See https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories"
63
- " for instructions on how to add this path to your VM." .format (path = path ,
64
- name = os .environ ["DOCKER_MACHINE_NAME" ], mounts = mounts ))
67
+ "See https://docs.docker.com/toolbox/toolbox_install_windows/"
68
+ "#optional-add-shared-directories for instructions on how to "
69
+ "add this path to your VM." .format (
70
+ path = path , name = os .environ ["DOCKER_MACHINE_NAME" ],
71
+ mounts = mounts ))
65
72
66
73
67
74
class DockerCommandLineJob (ContainerCommandLineJob ):
0 commit comments