docker-tools: add example for exportImage functionality and test
This commit is contained in:
parent
895f3956d2
commit
0319228a45
2 changed files with 8 additions and 0 deletions
|
@ -378,5 +378,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
docker.succeed(
|
||||
"docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} sh -c 'stat -c '%u' /home/jane | grep -E ^1000$'"
|
||||
)
|
||||
|
||||
with subtest("exportImage produces a valid tarball"):
|
||||
docker.succeed(
|
||||
"tar -tf ${examples.exportBash} > /dev/null"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -541,4 +541,7 @@ rec {
|
|||
config.Cmd = [ "hello" ];
|
||||
includeStorePaths = false;
|
||||
};
|
||||
|
||||
# Example export of the bash image
|
||||
exportBash = pkgs.dockerTools.exportImage { fromImage = bash; };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue