使用自定义容器环境变量部署Azure Webapp [英] Deploy Azure Webapp with custom container environment variables
问题描述
通常,我会在本地计算机上启动docker实例,例如docker run -t -i -e 'a=b' ...
In general, I would start the docker instance on my local machine like docker run -t -i -e 'a=b' ...
现在,我想部署并运行我自定义的Docker映像,该映像之前已上传到Docker Container Registry,并像上面的命令一样使用环境变量启动它.
Now, I would like to deploy and run my custom docker image which I uploaded to the Docker Container Registry before and start it like the command above - with environment variables.
检查 Azure CLI for WebApps ,您会看到一般应该设置环境变量.但是对我来说,这个环境变量"似乎不是传递给docker命令的环境变量.为什么?检查容器协议,我可以看到docker容器是如何启动的.没有设置环境变量.
Checking the Azure CLI for WebApps you can see that setting environment variables in general should be possible. But for me it seems this "environment variables" are not the environment variables which are passed to the docker command. Why? Checking the container protocol I can see how the docker container is started. There are no environment variables set.
使用 Azure容器,它会像az container create ... --environment-variables a=b
这样工作.这些环境变量被向下传递到容器/泊坞窗.这正是我要搜索的WebApp.
With Azure Container, it would work like this az container create ... --environment-variables a=b
. These environment variables are passed down to the container/docker. And this is exactly what I am searching for WebApps.
有人在使用以环境变量开头的客户Docker实例部署Azure Webapp方面有经验吗?
Does anyone have some experience in deploying Azure Webapps with customer Docker instances started with environment variables?
推荐答案
我想我找到了解决问题的方法:
I guess I found the solution for the problem: