diff options
Diffstat (limited to 'docker/api/build.py')
-rw-r--r-- | docker/api/build.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docker/api/build.py b/docker/api/build.py index 0486dce..3a67ff8 100644 --- a/docker/api/build.py +++ b/docker/api/build.py @@ -339,7 +339,14 @@ def process_dockerfile(dockerfile, path): abs_dockerfile = dockerfile if not os.path.isabs(dockerfile): abs_dockerfile = os.path.join(path, dockerfile) - + if constants.IS_WINDOWS_PLATFORM and path.startswith( + constants.WINDOWS_LONGPATH_PREFIX): + abs_dockerfile = '{}{}'.format( + constants.WINDOWS_LONGPATH_PREFIX, + os.path.normpath( + abs_dockerfile[len(constants.WINDOWS_LONGPATH_PREFIX):] + ) + ) if (os.path.splitdrive(path)[0] != os.path.splitdrive(abs_dockerfile)[0] or os.path.relpath(abs_dockerfile, path).startswith('..')): # Dockerfile not in context - read data to insert into tar later |