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."
|
echo " be better to only have one layer that contains a nix store."
|
||||||
|
|
||||||
export NIX_REMOTE=local?root=$PWD
|
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
|
${nix}/bin/nix-store --load-db < ${closureInfo {rootPaths = contentsList;}}/registration
|
||||||
|
|
||||||
mkdir -p nix/var/nix/gcroots/docker/
|
mkdir -p nix/var/nix/gcroots/docker/
|
||||||
|
|
Loading…
Reference in New Issue