dockerTools: Support files directly under /nix/store

Also makes sure that the files inside a layer added in a sorted order
to make the results more deterministic.
This commit is contained in:
Utku Demir
2020-07-04 22:00:57 +12:00
parent f6ef771ab9
commit cc46362929
3 changed files with 20 additions and 4 deletions
+6
View File
@@ -178,5 +178,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
# This check may be loosened to allow an *empty* store rather than *no* store.
docker.succeed("docker run --rm no-store-paths ls /")
docker.fail("docker run --rm no-store-paths ls /nix/store")
with subtest("Ensure buildLayeredImage supports files directly under /nix/store"):
docker.succeed(
"docker load --input='${pkgs.dockerTools.examples.filesInStore}'",
"docker run file-in-store |& grep 'some data'",
)
'';
})