Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Update container via Azure CLI failed. #26

Open
HaoHoo opened this issue Nov 14, 2018 · 5 comments
Open

Update container via Azure CLI failed. #26

HaoHoo opened this issue Nov 14, 2018 · 5 comments

Comments

@HaoHoo
Copy link

HaoHoo commented Nov 14, 2018

As docs shown we can just use 'create' to update the container if our docker image was updated. It's tell me that if I don't change the 'os type', 'restart policy', 'network profile', 'CPU', 'memory' and 'GPU', the container can be rebuild. But when I use this command line 'az container create --resource-group --name --image haohoo/image:version --location westus' is failed. It prompt 'The updates on container group '' are invalid...'

@yangl900
Copy link

Hi HaoHoo,

Could you share the full error message? There are a few immutable properties, I wonder if you changed any of those?

thanks!

@tshak
Copy link

tshak commented Apr 6, 2020

I'm seeing the same issue and the only value that I'm changing is --image. Is create really the prescribed way to update a container image?

@luispinedaneo
Copy link

I had the same issue. You have to verify that the values for os type, restart policy, network profile, CPU, memory and GPU correspond to those of the current container. If you don't set them, it will take the default ones:
os type: Linux
restart policy: Always
CPU: 1
memory: 1.5
GPU: null

In my case I had to re-set my network profile and restart policy with --network-profile myprofile --restart-policy OnFailure

@BeigeBadger
Copy link

BeigeBadger commented Jan 11, 2021

Pretty much the same as @luispinedaneo except my network profile was null (as per the output of az container list) so I only had to set the restart policy to match the existing one in the JSON result of the above command (OnFailure) and it worked.

NOTE: I had an issue with the IP address not being visible after the update so I had to use the IP address flag to set the address to public like so: --ip-address Public ref https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az_container_create.

@SaiKanth007
Copy link

@luispinedaneo Can you share information about "I had to re-set my network profile and restart policy with --network-profile myprofile --restart-policy OnFailure"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants