summary refs log tree commit diff
path: root/pkgs/build-support/docker
diff options
context:
space:
mode:
authorAntoine Eiche <lewo@abesis.fr>2018-12-27 11:10:53 +0100
committerAntoine Eiche <lewo@abesis.fr>2018-12-27 11:15:35 +0100
commit43cbba0274446797f6a8b3b26c8ac2bf5c792ebe (patch)
treef92e04c058e59295cb5469483956c3d1e3875971 /pkgs/build-support/docker
parent9d9a993b73316a19d7020f435eddb256777d94ca (diff)
downloadnixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar.gz
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar.bz2
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar.lz
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar.xz
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.tar.zst
nixpkgs-43cbba0274446797f6a8b3b26c8ac2bf5c792ebe.zip
dockerTools.examples.runAsRootParentImage: init
Example of running something as root on top of a parent image.
This is a regression test related to the PR #52109.
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r--pkgs/build-support/docker/examples.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
index 090bfafa085..a5a65fb2a40 100644
--- a/pkgs/build-support/docker/examples.nix
+++ b/pkgs/build-support/docker/examples.nix
@@ -176,4 +176,13 @@ rec {
       ];
     };
   };
+
+  # 12. example of running something as root on top of a parent image
+  # Regression test related to PR #52109
+  runAsRootParentImage = buildImage {
+    name = "runAsRootParentImage";
+    tag = "latest";
+    runAsRoot = "touch /example-file";
+    fromImage = bash;
+  };
 }