如何将 Azure 函数应用程序中的文件压缩到本地 c:\ 驱动器?

问题描述 投票:0回答:1

我正在尝试压缩函数应用程序的内容,如下所示

       az functionapp deployment source config-zip --name <function-app-name> --resource-group <resource-group-name> --src /site/wwwroot --output "c:\temp\func.zip"

但它给出了错误:

 No such file or directory: 'c:\\temp\\func.zip'

如何压缩文件?

即使我尝试使用

列出文件
 az functionapp file list --name <function-app-name> --resource-group <resource-group-name> --path /site/wwwroot

它也给出了一个错误:

 ERROR: 'file' is misspelled or not recognized by the system.
azure azure-functions
1个回答
0
投票

更改到函数应用所在的目录,然后运行以下命令来压缩文件以进行部署:

zip -r c:\temp\func.zip .

然后,运行以下命令将压缩的函数应用部署到 Azure:

az functionapp deployment source config-zip --name <function-app-name> --resource-group <resource-group-name> --src "c:\temp\func.zip"

请注意,

az functionapp deployment source config-zip
没有
--output
选项。请参阅此链接

© www.soinside.com 2019 - 2024. All rights reserved.