From 36c724b8e3ed0c34da3adc7ebacf587b2ad6283b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 23 Dec 2023 23:28:53 -0500 Subject: [PATCH] container startup commands did not work due to quoting of args; we now also evaluate any shell variables in the startup command before executing it --- src/modules/containers.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/containers.nix b/src/modules/containers.nix index 9e31eaae0..8b7d95f0f 100644 --- a/src/modules/containers.nix +++ b/src/modules/containers.nix @@ -28,7 +28,10 @@ let source ${shell.envScript} - exec "$@" + # expand any envvars before exec + cmd="`echo "$@"|${pkgs.envsubst}/bin/envsubst`" + + exec $cmd ''; mkDerivation = cfg: nix2container.nix2container.buildImage { name = cfg.name;