Skip to content

Commit

Permalink
Clear uname/gname when creating tar archive
Browse files Browse the repository at this point in the history
To ensure that the cache from docker command client
can be reused, we must clear group/user name as the docker
client does.

Together with golang/go#20150 this fixes docker#998
  • Loading branch information
Lars Jeppesen committed Apr 30, 2017
1 parent 72b9b72 commit 80aa511
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def create_archive(root, files=None, fileobj=None, gzip=False):
files = build_file_list(root)
for path in files:
i = t.gettarinfo(os.path.join(root, path), arcname=path)
i.uname = ''
i.gname = ''
if i is None:
# This happens when we encounter a socket file. We can safely
# ignore it and proceed.
Expand Down

0 comments on commit 80aa511

Please sign in to comment.