Merge pull request #95409 from utdemir/stream_layered_image_fix

dockerTools.streamLayeredImage: Store the customisation layer as a tarball
This commit is contained in:
Anderson Torres
2020-09-14 11:05:48 -03:00
committed by GitHub
4 changed files with 73 additions and 85 deletions
+1 -8
View File
@@ -219,18 +219,11 @@ import ./make-test-python.nix ({ pkgs, ... }: {
)
with subtest("Ensure correct behavior when no store is needed"):
# This check tests two requirements simultaneously
# 1. buildLayeredImage can build images that don't need a store.
# 2. Layers of symlinks are eliminated by the customization layer.
#
# This check tests that buildLayeredImage can build images that don't need a store.
docker.succeed(
"docker load --input='${pkgs.dockerTools.examples.no-store-paths}'"
)
# Busybox will not recognize argv[0] and print an error message with argv[0],
# but it confirms that the custom-true symlink is present.
docker.succeed("docker run --rm no-store-paths custom-true |& grep custom-true")
# 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")