首页 > 解决方案 > How to pass Azure Storage connection string to Container Instance

问题描述

I have an application that uses Azure Storage Tables that I would like to run in an Azure Container Instance. The Container Instance environment variables (my only option for passing configuration to the application running in the container) only allow alphanumeric and underscores in the quoted string values, and a connection string has things like semicolons and equals. I thought a Key Vault would work, but then I can't pass an application ID either. I can't pass:

The only thing I can even think of would be to encode these strings to bytes (UTF-8) and convert the bytes to a hex string, but that's a messy workaround. What is the recommended means of passingconfiguration to an Azure Container Instance?

enter image description here

标签: azure-container-service

解决方案


11/6 更新:我们更新了 Azure 门户,使其对 env var 输入更加宽松,因此具有特殊字符(如连接字符串)的字符串现在应该可以工作。谢谢!

这是当前 Azure 门户的一个约束。请通过 az cli 尝试此部署,它应该支持 env var 值中的特殊字符。


推荐阅读