Loading nixos/tests/docker-tools.nix +8 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,14 @@ in { "docker load --input='${examples.bashUncompressed}'", "docker rmi ${examples.bashUncompressed.imageName}", ) docker.succeed( "docker load --input='${examples.bashLayeredUncompressed}'", "docker rmi ${examples.bashLayeredUncompressed.imageName}", ) docker.succeed( "docker load --input='${examples.bashLayeredZstdCompressed}'", "docker rmi ${examples.bashLayeredZstdCompressed.imageName}", ) with subtest( "Check if the nix store is correctly initialized by listing " Loading pkgs/build-support/docker/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -517,7 +517,7 @@ rec { buildLayeredImage = lib.makeOverridable ({ name, compressor ? "gz", ... }@args: let stream = streamLayeredImage args; stream = streamLayeredImage (builtins.removeAttrs args ["compressor"]); compress = compressorForImage compressor name; in runCommand "${baseNameOf name}.tar${compress.ext}" Loading Loading @@ -1287,7 +1287,7 @@ rec { # Wrapper around streamNixShellImage to build an image from the result buildNixShellImage = { drv, compressor ? "gz", ... }@args: let stream = streamNixShellImage args; stream = streamNixShellImage (builtins.removeAttrs args ["compressor"]); compress = compressorForImage compressor drv.name; in runCommand "${drv.name}-env.tar${compress.ext}" Loading pkgs/build-support/docker/examples.nix +17 −1 Original line number Diff line number Diff line Loading @@ -509,7 +509,23 @@ rec { contents = pkgs.bashInteractive; }; # buildImage without explicit tag # buildLayeredImage without compression bashLayeredUncompressed = pkgs.dockerTools.buildLayeredImage { name = "bash-layered-uncompressed"; tag = "latest"; compressor = "none"; contents = pkgs.bashInteractive; }; # buildLayeredImage with zstd compression bashLayeredZstdCompressed = pkgs.dockerTools.buildLayeredImage { name = "bash-layered-zstd"; tag = "latest"; compressor = "zstd"; contents = pkgs.bashInteractive; }; # streamLayeredImage without explicit tag bashNoTagStreamLayered = pkgs.dockerTools.streamLayeredImage { name = "bash-no-tag-stream-layered"; contents = pkgs.bashInteractive; Loading Loading
nixos/tests/docker-tools.nix +8 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,14 @@ in { "docker load --input='${examples.bashUncompressed}'", "docker rmi ${examples.bashUncompressed.imageName}", ) docker.succeed( "docker load --input='${examples.bashLayeredUncompressed}'", "docker rmi ${examples.bashLayeredUncompressed.imageName}", ) docker.succeed( "docker load --input='${examples.bashLayeredZstdCompressed}'", "docker rmi ${examples.bashLayeredZstdCompressed.imageName}", ) with subtest( "Check if the nix store is correctly initialized by listing " Loading
pkgs/build-support/docker/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -517,7 +517,7 @@ rec { buildLayeredImage = lib.makeOverridable ({ name, compressor ? "gz", ... }@args: let stream = streamLayeredImage args; stream = streamLayeredImage (builtins.removeAttrs args ["compressor"]); compress = compressorForImage compressor name; in runCommand "${baseNameOf name}.tar${compress.ext}" Loading Loading @@ -1287,7 +1287,7 @@ rec { # Wrapper around streamNixShellImage to build an image from the result buildNixShellImage = { drv, compressor ? "gz", ... }@args: let stream = streamNixShellImage args; stream = streamNixShellImage (builtins.removeAttrs args ["compressor"]); compress = compressorForImage compressor drv.name; in runCommand "${drv.name}-env.tar${compress.ext}" Loading
pkgs/build-support/docker/examples.nix +17 −1 Original line number Diff line number Diff line Loading @@ -509,7 +509,23 @@ rec { contents = pkgs.bashInteractive; }; # buildImage without explicit tag # buildLayeredImage without compression bashLayeredUncompressed = pkgs.dockerTools.buildLayeredImage { name = "bash-layered-uncompressed"; tag = "latest"; compressor = "none"; contents = pkgs.bashInteractive; }; # buildLayeredImage with zstd compression bashLayeredZstdCompressed = pkgs.dockerTools.buildLayeredImage { name = "bash-layered-zstd"; tag = "latest"; compressor = "zstd"; contents = pkgs.bashInteractive; }; # streamLayeredImage without explicit tag bashNoTagStreamLayered = pkgs.dockerTools.streamLayeredImage { name = "bash-no-tag-stream-layered"; contents = pkgs.bashInteractive; Loading