Skip to content

Commit

Permalink
container startup commands did not work due to quoting of args; we no…
Browse files Browse the repository at this point in the history
…w also evaluate any shell variables in the startup command before executing it
  • Loading branch information
mcdonc committed Dec 24, 2023
1 parent dbcacb9 commit b6c69cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ let
source ${shell.envScript}
exec "$@"
# expand any envvars before exec
cmd=$(eval "echo $@")
exec $cmd
'';
mkDerivation = cfg: nix2container.nix2container.buildImage {
name = cfg.name;
Expand Down

0 comments on commit b6c69cd

Please sign in to comment.