summaryrefslogtreecommitdiff
path: root/docker/utils
diff options
context:
space:
mode:
Diffstat (limited to 'docker/utils')
-rw-r--r--docker/utils/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 0853ac4..7cd3b1a 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -72,7 +72,8 @@ def tar(path, exclude=None):
fnames = [name for name in filenames
if not fnmatch_any(os.path.join(relpath, name),
exclude)]
- for name in fnames:
+ dirnames.sort()
+ for name in sorted(fnames):
arcname = os.path.join(relpath, name)
t.add(os.path.join(path, arcname), arcname=arcname)
for name in dirnames: