about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/build-helpers/images/dockertools.section.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/build-helpers/images/dockertools.section.md b/doc/build-helpers/images/dockertools.section.md
index e732e0472926..d063f1961d89 100644
--- a/doc/build-helpers/images/dockertools.section.md
+++ b/doc/build-helpers/images/dockertools.section.md
@@ -845,6 +845,18 @@ buildImage {
 
 Creating base files like `/etc/passwd` or `/etc/login.defs` is necessary for shadow-utils to manipulate users and groups.
 
+When using `buildLayeredImage`, you can put this in `fakeRootCommands` if you `enableFakechroot`:
+```nix
+buildLayeredImage {
+  name = "shadow-layered";
+
+  fakeRootCommands = ''
+    ${pkgs.dockerTools.shadowSetup}
+  '';
+  enableFakechroot = true;
+}
+```
+
 ## fakeNss {#ssec-pkgs-dockerTools-fakeNss}
 
 If your primary goal is providing a basic skeleton for user lookups to work,