Note: _Unlike the shell form, the exec form does not invoke a command shell. This means that normal shell processing does not happen. For example, ENTRYPOINT [ "echo", "$HOME" ] will not do variable substitution on $HOME._ If you want shell processing then either use the shell form or execute a shell directly, for example: ENTRYPOINT [ "sh", "-c", "echo $HOME" ]. When using the exec form and executing a shell directly, as in the case for the shell form, it is the shell that is doing the environment variable expansion, not docker.
Thanks for the reply. What I hoped to achieve was have ENTRYPOINT execute a program and then CMD would include dynamic parameters in the form of enviroment variables.
With regards to documentation, I’ve used that format but it still doesn’t work. That paragraph corresponds to CMD as well I think.
I understand… I had to change the keyword script like this
some to prove the parms are coming across
#!/bin/bash -x
echo parms equal $@
for i in $*; do
echo $i
done
export test_var1=$test_var
t=$@
echo executing parms
# use eval to execute the passed in command string
v=eval $t
echo done executing parms, results=$v
env