Update docker image in Azure Container Instances
The ways I've found so far are
to use the Azure Resource explorer.
- Find the container group
- Click read/write
- Click edit
- Change the image version
- Put password in
imageRegistryCredentials
when using a private registry. - Click Post
This blog post using the Go SDK.
- Delete and recreate the group by using an ARM template. You'll loose the public ip using this approach.
You'll have some downtime in any of the cases above.
If you follow the practice of naming tags :latest
then no need to re-create the Container
- Push the image
- Reset the Container Instance
- Done!
This is for image only update
In addition to the mentioned re-creation of the container group and depending on your scenario you could also deploy a container group pointing to the :latest
docker image once.
In my scenario I have a scheduled container instance that is running once a day. Whenever it starts it is pulling the docker image with the :latest
tag from the azure container registry. This avoids re-creation of the container group.
You can also use Azure CLI. Run az container create
again using the same resource group name and container group name, with the new image tag. The container will be updated with new image.