We had code like this in a shell script:
CMD="docker container create \
--name $CONTAINER_NAME \
--network $NETWORK \
nginx:1.17 \
nginx-debug -g 'daemon off;'"
$CMD
when we executed the script, it did not work as expected. The container gives following error:
nginx: invalid option: "off;'"
Then we changed to:
eval $CMD
in the bash script and then it started working! I'd like to understand what is the difference between the two.