summary refs log tree commit diff
path: root/pkgs/build-support/docker/examples.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/docker/examples.nix')
-rw-r--r--pkgs/build-support/docker/examples.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
index 29eea33a7e1..d7d1a693310 100644
--- a/pkgs/build-support/docker/examples.nix
+++ b/pkgs/build-support/docker/examples.nix
@@ -117,7 +117,12 @@ rec {
       pkgs.nix
     ];
     config = {
-      Env = [ "NIX_PAGER=cat" ];
+      Env = [
+        "NIX_PAGER=cat"
+        # A user is required by nix
+        # https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478
+        "USER=nobody"
+      ];
     };
   };
 
@@ -231,7 +236,6 @@ rec {
     name = "another-layered-image";
     tag = "latest";
     config.Cmd = [ "${pkgs.hello}/bin/hello" ];
-    contents = [ pkgs.hello ];
   };
 
 }