Skip to content

Commit

Permalink
Merge pull request #62719 from danieldk/docker-fix-shared-layers
Browse files Browse the repository at this point in the history
dockerTools.buildLayeredImage: restore layer sharing
  • Loading branch information
nlewo committed Jun 6, 2019
2 parents 48e8049 + d7f3186 commit b0f4499
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/build-support/docker/store-path-to-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down

0 comments on commit b0f4499

Please sign in to comment.