Skip to content

Commit

Permalink
Merge pull request NixOS#88762 from alexbiehl/alex/docker-tools
Browse files Browse the repository at this point in the history
dockerTools: Properly add /nix/ and /nix/store/ first to layer.tar
  • Loading branch information
shlevy authored May 24, 2020
2 parents 196cc47 + 886c923 commit fffa6e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/build-support/docker/store-path-to-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ mkdir -p nix/store
# store path to the absolute store path.
tarhash=$(
basename -a "$@" |
tar -cp nix \
-C /nix/store --verbatim-files-from --files-from - \
tar --create --preserve-permissions --absolute-names nix \
--directory /nix/store --verbatim-files-from --files-from - \
--hard-dereference --sort=name \
--mtime="@$SOURCE_DATE_EPOCH" \
--owner=0 --group=0 \
--transform 's,^nix(/|$),/nix/,' \
--transform 's,^nix$,/\0,' \
--transform 's,^nix/store$,/\0,' \
--transform 's,^[^/],/nix/store/\0,rS' |
tee "$layerPath/layer.tar" |
tarsum
Expand Down

0 comments on commit fffa6e8

Please sign in to comment.