question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker image deployment not triggering image pull

See original GitHub issue

We use a Docker deployment for our Web App, using the example that was provided here: https://github.com/Azure/actions-workflow-samples/blob/master/AppService/docker-webapp-container-on-azure.yml

The only difference is that we don’t do

    - name: 'Deploy to Azure Web App for Container'
      uses: azure/webapps-deploy@v2
      with: 
        app-name: ${{ env.AZURE_WEBAPP_NAME }} 
        images: ${{ env.CONTAINER_REGISTRY }}/nodejsapp:${{ github.sha }}

but instead

    - name: 'Deploy to Azure Web App for Container'
      uses: azure/webapps-deploy@v2
      with: 
        app-name: ${{ env.AZURE_WEBAPP_NAME }} 
        images: ${{ env.CONTAINER_REGISTRY }}/nodejsapp:latest <-- we use latest instead of the SHA

… because we can’t afford to have a new image SHA for every deployment we do and have that pushed to ACR. We only have the dev and latest tags for now, for our development and production environments, respectively. That’s enough for this small app we’re building.

Even though the GitHub Action mentions that the deployment has finished:

Deploying image ***.azurecr.io/REDACTED:dev to App Service REDACTED-backend-dev
Successfully deployed image to App Service.
Successfully updated deployment History at https://REDACTED.scm.azurewebsites.net/api/deployments/REDACTED
App Service Application URL: http://REDACTED-backend-dev.azurewebsites.net

… the App Service doesn’t download the latest image. I have to go into the Azure Portal and click “Restart” - then the updated image will be downloaded.

It looks like a similar issue was fixed in Azure Pipelines a while ago: https://github.com/microsoft/azure-pipelines-tasks/issues/9530

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jorenbroekemacommented, Jul 29, 2021

Hmm so at the API level, I assume some check like if (oldTag === newTag) { return; } is done, would it make sense to remove this check or would that be throwing out the baby with the bathwater?

One solution could be to add a check for the tag “latest” but if you’ve got other distribution tags where it still needs to trigger, the problem will persist for those non-latest tags.

Another solution which I think makes more sense in checking that the image has changed since last deploy, is by checking the image digest (sha256 string), if that one changed since last time you know for sure whether you should trigger a deploy, regardless of whether the tag changed or not.

0reactions
kumaraksh1commented, Dec 29, 2022

Hi, We have investigated this issue and we will be working on it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spinnaker not triggering pipeline when new image is released ...
We have a Kubernetes cluster running on Google Container Engine and we are trying to setup Spinnaker so it triggers pipeline and deployes...
Read more >
Spinnaker build does not trigger on a re-push of an existing ...
The reason behind why re-push of an existing image tag does not work with Automated Triggers to Docker Registry is deployment ...
Read more >
Trigger a Spinnaker pipeline on Docker image push - OpsMx
Learn how to trigger Spinnaker pipeline on Docker image push with a few easy steps.
Read more >
Triggering updates on image stream changes
OpenShift Container Platform deployment configurations and build configurations can be automatically triggered by changes to image stream tags.
Read more >
Pulling and Pushing Images in the Docker Client - Harbor docs
If Harbor is configured for HTTP, you must configure your Docker client so that it can connect to insecure registries. In your Docker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found