Skip to content

Commit

Permalink
dockerTools.binSh: init
Browse files Browse the repository at this point in the history
  • Loading branch information
flokli committed Dec 2, 2020
1 parent f7ee270 commit e054694
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/build-support/docker/default.nix
@@ -1,4 +1,5 @@
{
bashInteractive,
buildPackages,
cacert,
callPackage,
Expand Down Expand Up @@ -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 = [
Expand All @@ -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.
Expand Down

0 comments on commit e054694

Please sign in to comment.