Docker: Plugins not upgraded anymore

Hi,

To define my custom Docker image based on sonarqube:10.X-community and add my custom plugin, I used to follow the instructions at https://hub.docker.com/_/sonarqube (Customized image section):

COPY sonar-custom-plugin-1.0.jar /opt/sonarqube/extensions/

It was working fine before but does not seem to work anymore with SonarQube 10.7.
It might be due to the addition of the following VOLUME instruction to the Dockerfile: SONAR-22581 docker image openshift hardening · SonarSource/docker-sonarqube@e31e0be · GitHub

This volume now takes precedence and when I upgrade to the latest version of my custom Docker image, the upgraded version of my custom plugin is no longer taken into account and loaded into SonarQube. Previous version of my plugin is loaded from this volume instead.

Am I missing anything? What would now be the recommended way to add a custom plugin to a custom Docker image?

Thank you

Regards

Nicolas