将环境variables从docker传递到supervisord

我使用docker run来传递两个envvariables:

docker run -d --name foobar -e STAGE=testing -e STAGE_URL=http://... 

以及启动一些进程的主pipe的dockerfile踢:

 CMD ["/usr/bin/supervisord", "--configuration", "/etc/supervisor/conf.d/supervisord.conf"] 

supervisord.conf我尝试读取variables:

 [program:build] priority=1 autorestart=false directory=/app/foobar command=grunt build --force --stage ${STAGE} --stage-url ${STAGE_URL} 

我也试过

 $STAGE 

 %(STAGE)s 

但是STAGE从不被视为一个variables。 它永远不会被实际的内容取代。 相反,它被视为一个简单的string。 这导致:

 --stage STAGE --stage-url STAGE_URL 

代替

 --stage testing --stage-url http://... 

这是甚至可能是我在做什么? 主pipe文件不清楚这个话题。 有任何想法吗?

尝试%(ENV_STAGE)s

文件似乎表明这是要走的路。