Update Sonar-scanner

SonarQube version : 10.7
Sonar-Scanner running as Docker on remote server.

I have recently updated my SonarQube to the version 10.7. Now I would like to update the Sonar-Scanner version to the latest one. How do I accomplish this as Sonar Scanner is running on a remote server with Docker.

# docker images | grep scanner           
sonarsource/sonar-scanner-cli                                                                 4.6               
sonarsource/sonar-scanner-cli                                                                 4.5 

Can I update the scanner using the below Docker command?

docker pull sonarsource/sonar-scanner-cli:latest

Will this command update my scanner? Is there any other steps I had to do after this?

Thanks

Hey there!

You can always pull the latest version either by running docker pull sonarsource/sonar-scanner-cli:latest or specifying a specific tag (docker pull sonarsource/sonar-scanner-cli:11).

Just pulling the new image won’t automatically update your existing containers or scan commands - you need to make sure you’re referencing the new version in your docker run commands (docker run sonarsource/sonar-scanner-cli:latest). * If you have any CI/CD pipelines or scripts that explicitly specify version 4.5 or 4.6, you’ll need to update those references.

1 Like

Hey Colin,

Thanks for help. This worked and i have updated the script as well to use the new image.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.