Skip to content

Commit 2b05338

Browse files
committed
editing build to generate compressed image, not compressed tar
1 parent a80bd1e commit 2b05338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

singularity/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def run_build(build_dir=None,spec_file=None,repo_url=None,token=None,size=None,b
174174
build_dir=build_dir)
175175

176176
# Compress image
177-
compressed_image = "%s.tar.gz" %image
178-
os.system('sudo singularity export %s | gzip -9 > %s' %(image,compressed_image))
177+
compressed_image = "%s.img.gz" %image
178+
os.system('gzip -c -9 %s > %s' %(image,compressed_image))
179179

180180
# Package the image metadata (files, folders, etc)
181181
image_package = package(image_path=image,

0 commit comments

Comments
 (0)