feat(server): Apply GZIP compression to all image layers

This fixes #62
This commit is contained in:
Vincent Ambo 2019-10-11 01:28:38 +01:00 committed by Vincent Ambo
parent bf2718cebb
commit 0693e371d6
4 changed files with 15 additions and 9 deletions

View file

@ -126,9 +126,9 @@ let
# Image layer that contains the symlink forest created above. This
# must be included in the image to ensure that the filesystem has a
# useful layout at runtime.
symlinkLayer = runCommand "symlink-layer.tar" {} ''
symlinkLayer = runCommand "symlink-layer.tar.gz" {} ''
cp -r ${contentsEnv}/ ./layer
tar --transform='s|^\./||' -C layer --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 -cf $out .
tar --transform='s|^\./||' -C layer --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 -czf $out .
'';
# Metadata about the symlink layer which is required for serving it.