diff options
author | Florian Klink <flokli@flokli.de> | 2020-12-02 14:51:06 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2020-12-02 14:57:23 +0100 |
commit | e054694925bcef63629365559c3987cd19556109 (patch) | |
tree | 0bb1e4f70940938209b2facc4479b6b03090a2d6 | |
parent | f7ee2706c2aaef359dd05b6910dcbfa6b3493dee (diff) |
dockerTools.binSh: init
-rw-r--r-- | pkgs/build-support/docker/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index c992cf4fbb8e..b30ac5c77655 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -1,4 +1,5 @@ { + bashInteractive, buildPackages, cacert, callPackage, @@ -688,6 +689,7 @@ rec { # Provide a /etc/passwd and /etc/group that contain root and nobody. # Useful when packaging binaries that insist on using nss to look up # username/groups (like nginx). + # /bin/sh is fine to not exist, and provided by another shim. fakeNss = symlinkJoin { name = "fake-nss"; paths = [ @@ -705,6 +707,12 @@ rec { ]; }; + # This provides /bin/sh, pointing to bashInteractive. + binSh = runCommand "bin-sh" {} '' + mkdir -p $out/bin + ln -s ${bashInteractive}/bin/bash $out/bin/sh + ''; + # Build an image and populate its nix database with the provided # contents. The main purpose is to be able to use nix commands in # the container. |