diff options
author | Kevin Brubeck Unhammer <unhammer@fsfe.org> | 2024-01-25 16:10:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 16:10:21 +0100 |
commit | ad99ac9356a875b3e2afbf020a4a7d58f03417dd (patch) | |
tree | 8091c927dcdf775cba8555d88e32044294be7f37 /doc/build-helpers | |
parent | 1cbd2ac8f8174b90c1a4aa12230f59a6eb7c3690 (diff) |
doc: Note on how to use shadowSetup with buildLayeredImage (#267220)
* Note on how to use shadowSetup with buildLayeredImage
* Update doc/build-helpers/images/dockertools.section.md
---------
Co-authored-by: Silvan Mosberger <github@infinisil.com>
Diffstat (limited to 'doc/build-helpers')
-rw-r--r-- | doc/build-helpers/images/dockertools.section.md | 12 |
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, |