summary refs log tree commit diff
path: root/nixos/tests/docker-tools-cross.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-07-01 15:02:00 +0200
committerRobert Hensing <robert@roberthensing.nl>2022-07-06 07:30:24 +0200
commite007eb480c6041fd98b8f9e53bdac2ba82e4648c (patch)
tree4d1b5f86a8ecfa8216822390525ff4ceaef75b96 /nixos/tests/docker-tools-cross.nix
parent72f17cca89ec773e5845f5fa1bffcf0b7a4e2094 (diff)
downloadnixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar.gz
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar.bz2
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar.lz
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar.xz
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.tar.zst
nixpkgs-e007eb480c6041fd98b8f9e53bdac2ba82e4648c.zip
dockerTools.buildImage: Add copyToRoot to replace contents, explain usage
Diffstat (limited to 'nixos/tests/docker-tools-cross.nix')
-rw-r--r--nixos/tests/docker-tools-cross.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/tests/docker-tools-cross.nix b/nixos/tests/docker-tools-cross.nix
index 8791ec25812..14cb14ceeae 100644
--- a/nixos/tests/docker-tools-cross.nix
+++ b/nixos/tests/docker-tools-cross.nix
@@ -24,7 +24,11 @@ let
   hello1 = remoteCrossPkgs.dockerTools.buildImage {
     name = "hello1";
     tag = "latest";
-    contents = remoteCrossPkgs.hello;
+    copyToRoot = remoteCrossPkgs.buildEnv {
+      name = "image-root";
+      pathsToLink = [ "/bin" ];
+      paths = [ remoteCrossPkgs.hello ];
+    };
   };
 
   hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage {