我正在使用它创建一个Azure容器应用程序
az containerapp create -n sample -g my-container-app-env --image sampleapi-docker-build.domainname/sample-dotnet:2.0.2989 --yaml ./configuration.yml
字符串
在我的configuration.yml文件中
template:
containers:
- name: sample-dotnet
#image: sampleapi-docker-verify.domain/sample-dotnet:2.0.2989
resources:
cpu: 0.25
memory: .5Gi
型
图像标记被注解掉了,我试图将其作为参数传递给create命令。这就是错误
(ContainerAppImageRequired) Container with name 'sample-dotnet' must have an 'Image' property specified.
型
如何在create命令中提供一些参数,在yaml配置文件中提供其他参数??
1条答案
按热度按时间llmtgqce1#
图像标记被注解掉了,我试图将其作为参数传递给create命令。这就是错误
字符串
如果在使用
Az Cli
创建容器应用程序时使用yaml
传递配置,则将忽略包含容器应用程序配置的.yaml
文件的路径,其余所有其他参数都将被忽略。检查MS Doc以供参考。要解决此问题,请传递除容器应用名称和资源组名称外的所有配置
创建容器应用的Azure Cli命令。
型
配置.yml
型
输出:
的数据
运行上述命令后,容器应用程序在门户中成功创建,如下所示。
的
参考使用YAML配置创建容器应用程序并检查YAML配置示例