mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
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
@ -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 New Issue
Block a user