0

Maybe somebody can help me to solve this issue as I am a bit confused and honestly burning out on this little project.

I have 2 web apps, one is my production environemnet and the other web app is a staging, I have a pipeline that build a docker image and push it to the staging for testing, and when I am happy with the output I do a swap to send everything to prod.

Now everything here works fine, but I realise that the docker built version don't match between staging and prod. (staging is one version behind all the time).

So I was looking into azure python sdk to see if I can script the deployment of a specific docker version that I have in my azure acr without any success.

I can list the docker images that I have from the azure-cli, but I cannot find a python sdk library to automate this deployment.

the only bit of code I found it was the following:

from azure.containerregistry import ContainerRegistryClient
from azure.identity import DefaultAzureCredential

account_url = "URL"
client = ContainerRegistryClient(account_url, DefaultAzureCredential())

but nothing related to deployment of specific docker images to a web app. If anyone can help me to find a python library to achieve this, I would be gratefully.

Thank you so much

4

1 回答 1

1

Azure 容器注册表库当前不包含将特定 docker 映像部署到 Web 应用程序的功能。但是,有一些使用 Azure CLI使用 ACR 任务构建和运行容器映像使用 docker cli 向/从 ACR 推送/拉取的文档。

您能否提供有关您的部署的更多信息(这可以帮助我向您提供正确的信息)?您是要部署到 Azure VM、kubernetes 还是其他东西?

仅供参考,我是 Azure SDK 团队的开发人员,并为 ACR Python 库做出了贡献。

于 2021-07-12T19:02:54.213 回答