summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorlewo <lewo@abesis.fr>2019-06-06 14:53:46 +0200
committerGitHub <noreply@github.com>2019-06-06 14:53:46 +0200
commitb0f4499e92152feb642c3ec1f6ce73c7971b2a65 (patch)
tree393a02577169ad7107c772eaeb050e565ca094c1 /pkgs
parent48e8049c857c92a7ac8a77bbcefca166827c872c (diff)
parentd7f3186b4818fe8c6aaa5922861ed611c7249475 (diff)
downloadnixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar.gz
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar.bz2
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar.lz
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar.xz
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.tar.zst
nixpkgs-b0f4499e92152feb642c3ec1f6ce73c7971b2a65.zip
Merge pull request #62719 from danieldk/docker-fix-shared-layers
dockerTools.buildLayeredImage: restore layer sharing
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/build-support/docker/store-path-to-layer.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/docker/store-path-to-layer.sh b/pkgs/build-support/docker/store-path-to-layer.sh
index 98c5b8cc212..bcad9e83e06 100755
--- a/pkgs/build-support/docker/store-path-to-layer.sh
+++ b/pkgs/build-support/docker/store-path-to-layer.sh
@@ -9,7 +9,9 @@ layerPath="./layers/$layerNumber"
 echo "Creating layer #$layerNumber for $@"
 
 mkdir -p "$layerPath"
-tar --no-recursion -rf "$layerPath/layer.tar" /nix /nix/store
+tar --no-recursion -rf "$layerPath/layer.tar" \
+    --mtime="@$SOURCE_DATE_EPOCH" \
+    --owner=0 --group=0 /nix /nix/store
 tar -rpf "$layerPath/layer.tar" --hard-dereference --sort=name \
     --mtime="@$SOURCE_DATE_EPOCH" \
     --owner=0 --group=0 "$@"