mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
Merge pull request #207403 from wfranzini/docker-rsyncable-images
dockerTools: make gzipped docker images faster to update by rsync
This commit is contained in:
commit
1779a185aa
1 changed files with 4 additions and 4 deletions
|
@ -486,7 +486,7 @@ rec {
|
|||
inherit (stream) imageName;
|
||||
passthru = { inherit (stream) imageTag; };
|
||||
nativeBuildInputs = [ pigz ];
|
||||
} "${stream} | pigz -nT > $out";
|
||||
} "${stream} | pigz -nTR > $out";
|
||||
|
||||
# 1. extract the base image
|
||||
# 2. create the layer
|
||||
|
@ -735,7 +735,7 @@ rec {
|
|||
chmod -R a-w image
|
||||
|
||||
echo "Cooking the image..."
|
||||
tar -C image --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --xform s:'^./':: -c . | pigz -nT > $out
|
||||
tar -C image --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --xform s:'^./':: -c . | pigz -nTR > $out
|
||||
|
||||
echo "Finished."
|
||||
'';
|
||||
|
@ -775,7 +775,7 @@ rec {
|
|||
mv repositories image/repositories
|
||||
mv manifest.json image/manifest.json
|
||||
# Create tarball and gzip
|
||||
tar -C image --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --xform s:'^./':: -c . | pigz -nT > $out
|
||||
tar -C image --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --xform s:'^./':: -c . | pigz -nTR > $out
|
||||
'';
|
||||
|
||||
|
||||
|
@ -1220,5 +1220,5 @@ rec {
|
|||
inherit (stream) imageName;
|
||||
passthru = { inherit (stream) imageTag; };
|
||||
nativeBuildInputs = [ pigz ];
|
||||
} "${stream} | pigz -nT > $out";
|
||||
} "${stream} | pigz -nTR > $out";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue