Reputation: 1567
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
Upvotes: 0
Views: 211
Reputation: 395
The Azure Container Registry library does not currently contain functionality for deploying specific docker images to a web app. However there is some documentation for using the Azure CLI to Build and run container image using ACR tasks or using the docker cli to push/pull to/from ACR.
Can you also provide more information about your deployment (this can help me get the right information to you)? Are you deploying to an Azure VM, kubernetes, or something else?
FYI I am a dev on the Azure SDK team and contributed to the ACR Python library.
Upvotes: 1