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>
This commit is contained in:
parent
1cbd2ac8f8
commit
ad99ac9356
1 changed files with 12 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue