Azure Web App Docker container keeps getting redownloaded

  Kiến thức lập trình

I have an Azure Web App with a Docker container deployed from an Azure Container Registry. Once in awhile when I go to access my webapp it shows that it’s downloading and extracting a “newer image” for the same container again. According to the logs it’s done this 8 times within the last 24 hours, but according to the container registry the container hasn’t been updated since last month. Why is it doing this and how can I stop it? It’s causing my app to be constantly offline.

Here is an example log:

2024-06-11T02:04:08.005Z INFO - e5cb4ff8283c Downloading 1777MB / 4415MB
2024-06-11T02:04:08.097Z INFO - e5cb4ff8283c Downloading 1788MB / 4415MB
...
2024-06-11T02:04:33.397Z INFO - e5cb4ff8283c Downloading 4358MB / 4415MB
2024-06-11T02:04:33.841Z INFO - e5cb4ff8283c Verifying Checksum
2024-06-11T02:04:33.842Z INFO - e5cb4ff8283c Download complete
2024-06-11T02:04:34.103Z INFO - e5cb4ff8283c Extracting 544KB / 4415MB
2024-06-11T02:04:34.212Z INFO - e5cb4ff8283c Extracting 2MB / 4415MB
...
2024-06-11T02:08:03.882Z INFO - 37be3bacfb45 Pull complete
2024-06-11T02:08:03.959Z INFO - Digest: sha256:b6e72dbc016f5bd0c21947b353854fc7516510bd5964dcf9139b0218ea20f326
2024-06-11T02:08:03.962Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T02:08:03.996Z INFO - Pull Image successful, Time taken: 271 Seconds
2024-06-11T02:08:04.577Z INFO - Starting container for site
2024-06-11T02:08:04.577Z INFO - docker run -d --expose=4200 --name mydemo_0_fd507ee6 -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=myDemo -e WEBSITE_AUTH_ENABLED=True -e PORT=4200 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=mydemo.azurewebsites.net -e WEBSITE_INSTANCE_ID=8208f53149922e3976919b315d79cc0270505b7c74ab97488e790c1dc2b950f0 mycontainer.azurecr.io/mydemo:v3.0 /bin/bash /data/gitclone/myDemo/FrontEnd/start.sh
2024-06-11T02:08:04.577Z INFO - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2024-06-11T02:08:08.799Z INFO - Initiating warmup request to container mydemo_0_fd507ee6_msiProxy for site mydemo
2024-06-11T02:08:08.866Z INFO - Container mydemo_0_fd507ee6_msiProxy for site mydemo initialized successfully and is ready to serve requests.
2024-06-11T02:08:08.866Z INFO - Initiating warmup request to container mydemo_0_fd507ee6 for site mydemo
2024-06-11T02:08:59.970Z INFO - Container mydemo_0_fd507ee6 for site mydemo initialized successfully and is ready to serve requests.
2024-06-11T02:08:59.970Z INFO - Initiating warmup request to container mydemo_0_fd507ee6_middleware for site mydemo
2024-06-11T02:09:00.224Z INFO - Container mydemo_0_fd507ee6_middleware for site mydemo initialized successfully and is ready to serve requests.
2024_06_11_pl1mdlwk000CGP_docker.log:
2024-06-11T04:43:11.100Z INFO - c153187b164d Downloading 1129MB / 1558MB
2024-06-11T04:43:11.101Z INFO - e5cb4ff8283c Downloading 1243MB / 4415MB
...

Just looking at the timestamps for how often a “newer image” has been downloaded, it seems this has happened 8 times over the last 24h.

2024-06-11T00:49:48.476Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T02:08:03.962Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T04:46:57.822Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T06:08:13.868Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T07:26:34.664Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T08:44:46.129Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T18:43:03.239Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0
2024-06-11T20:02:01.164Z INFO - Status: Downloaded newer image for mycontainer.azurecr.io/mydemo:v3.0

The container registry says this container hasn’t been updated in over a month. (Today’s date is 6/11).

LEAVE A COMMENT