mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
buildImageWithNixDb: export USER (#74959)
dockerTools.buildImageWithNixDb: export USER Changes to Nix user detection (./src/nix-channel/nix-channel.cc#L-166) cause this function to error. Exporting USER fixes this.
This commit is contained in:
parent
f51fe315e0
commit
81b0a20dfa
@ -845,6 +845,9 @@ rec {
|
||||
echo " be better to only have one layer that contains a nix store."
|
||||
|
||||
export NIX_REMOTE=local?root=$PWD
|
||||
# A user is required by nix
|
||||
# https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478
|
||||
export USER=nobody
|
||||
${nix}/bin/nix-store --load-db < ${closureInfo {rootPaths = contentsList;}}/registration
|
||||
|
||||
mkdir -p nix/var/nix/gcroots/docker/
|
||||
|
Loading…
Reference in New Issue
Block a user