Add /nix/store to each layer.tar

To be totally consistent with the way Docker builds images we need to
include the /nix/store in the layer tarballs first.
This commit is contained in:
Alex Biehl 2019-03-27 11:34:35 +01:00
parent 7205c1ee3e
commit 096e3cbdec
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ layerPath="./layers/$layerNumber"
echo "Creating layer #$layerNumber for $@"
mkdir -p "$layerPath"
tar --no-recursion -rf "$layerPath/layer.tar" /nix /nix/store
tar -rpf "$layerPath/layer.tar" --hard-dereference --sort=name \
--mtime="@$SOURCE_DATE_EPOCH" \
--owner=0 --group=0 "$@"