Skip to content

Commit

Permalink
containers: create /bin/devenv-entrypoint and /usr/bin/env
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarewk committed May 11, 2023
1 parent 0c0e5be commit adc0208
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ let
tag = cfg.version;
copyToRoot = [
(pkgs.runCommand "create-paths" { } ''
mkdir -p $out/tmp
mkdir -p $out/tmp $out/usr/bin
ln -sfT ${pkgs.coreutils-full}/bin/env $out/usr/bin/env
'')
(pkgs.buildEnv {
name = "root";
paths = [
pkgs.coreutils-full
pkgs.bash
pkgs.dockerTools.caCertificates
(pkgs.writeShellApplication {
name = "devenv-entrypoint";
text = ''exec ${lib.escapeShellArgs cfg.entrypoint} "$@"'';
})
] ++ lib.optionals (cfg.copyToRoot != null) [ cfg.copyToRoot ];
pathsToLink = "/";
})
Expand Down

0 comments on commit adc0208

Please sign in to comment.