This commit is contained in:
Markus Friedrich 2025-01-23 10:20:31 +00:00 committed by GitHub
commit fc806296d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -97,6 +97,11 @@ def create_archive(root, files=None, fileobj=None, gzip=False,
# and directories executable by default. # and directories executable by default.
i.mode = i.mode & 0o755 | 0o111 i.mode = i.mode & 0o755 | 0o111
# reset uid and gid to 0 to avoid build cache invalidations due to
# changed ownership. (docker-cli does the same)
i.uid = 0
i.gid = 0
if i.isfile(): if i.isfile():
try: try:
with open(full_path, 'rb') as f: with open(full_path, 'rb') as f: