Container not restarting with new image

Eduardo Elarrat 1 Reputation point
2022-11-04T11:49:35.267+00:00

Hello everyone,

I have two CD pipelines that build and push docker images to the registry, one for the Backend API and the other for an Angular application. Both suddenly stopped being updated after the docker image build/push step. We added an additional restart step in the pipeline to make sure that it gets restarted, but it didn't work, We tried manually restarting it, but also no success.

Is there anyone else with this same problem?

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
387 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. shiva patpi 13,131 Reputation points Microsoft Employee
    2022-11-04T22:53:28.82+00:00

    Hello @EduardoElarrat-2500 ,
    Were you able to see any logs ?
    Can you kindly try out with the old image, see if that works. ?
    If it is not working with the old image, then try to attach the container so that you can pull the live logs when the container states are getting changed.

    You can use the below document to get the logs:
    https://learn.microsoft.com/en-us/azure/container-instances/container-instances-get-logs

    To see the logs :- az container logs --resource-group myResourceGroup --name mycontainer

    You can attach the container to get streaming logs: az container attach --resource-group myResourceGroup --name mycontainer

    To see why the diagnostics events please use: az container show --resource-group myResourceGroup --name mycontainer

    0 comments No comments

  2. Eduardo Elarrat 1 Reputation point
    2022-11-07T12:09:23.653+00:00

    Sorry for the late reply.
    Yes, the old image works, my problem is when I push a new image to the registry. As I said, if I restart manually, it also doesn't work, but if I create a new app variable, Azure asks if I want to restart the service - I hit yes - and it works. I'll investigate it further during this day the logs to see what's happening

    0 comments No comments

  3. Eduardo Elarrat 1 Reputation point
    2022-11-08T12:12:36.193+00:00

    We had another occurrence. I manually ran the pipeline and nothing happened. Idk why but I can't attach the log file, so here is the content:

    https://docs.google.com/document/d/1NT85mupJZLXkpulvQrVRyQVm6-wLOGTwg9U1mOx7YV4/edit?usp=sharing

    In the meanwhile, my app's logstream doesn't show any rows related to that.

    But if I got the App Config, create an random app var and confirm app restart, I now have in my logstream:

    2022-11-08T12:17:57.569Z INFO  - Recycling container because of AppSettingsChange and isMainSite = True  
    2022-11-08T12:17:57.770Z INFO  - Pulling image: <REDACTED>.azurecr.io/jrvs-back-end/jrvs/api:latest  
    2022-11-08T12:17:58.736Z INFO  - latest Pulling from jrvs-back-end/jrvs/api  
    (...)