Skip to content

Commit a39ae14

Browse files
committed
fix(docker): don't open files in stream_context_tar
Opening file paths here results in an OSError in Gecko due to the large number of files involved in creating docker images there. The underlying tar writer accepts both file paths or file objects, so switch to paths to avoid the error in Gecko.
1 parent 70c73af commit a39ae14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/taskgraph/util/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def stream_context_tar(topsrcdir, context_dir, out_file, image_name=None, args=N
149149
for f in files:
150150
source_path = os.path.join(root, f)
151151
archive_path = source_path[len(context_dir) + 1 :]
152-
archive_files[archive_path] = open(source_path, "rb")
152+
archive_files[archive_path] = source_path
153153

154154
# Parse Dockerfile for special syntax of extra files to include.
155155
content = []

0 commit comments

Comments
 (0)