I'm trying to use the target host's env variable to parametrize my container when launching it with the remote API, but none of these worked ...
"Env": [
"ENV_VAR=`$TEST`",
"ENV_VAR2=$TEST"
],
Does anyone have an idea how to achieve this ?
If
$TEST
is an environment variable from the host, thepayload.json
needs to include its value, not$TEST
, as thePOST
will not change/interpret$TEST
(but pass it literally).If, instead of using a
payload.json
file, you used a command with the json directly in it, you could wrap the json part between double quotes: then$TEST
would be interpreted by the shell.See "How to include environment variable in bash line CURL?"