I'm feeding a json while POSTing to : /containers/create?name=myName -d payload.json
("Env
" being in the root of the payload)
If $TEST
is an environment variable from the host, the payload.json
needs to include its value, not $TEST
, as the POST
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?"