docker run --rm -d --name sonarqube \
-p 9000:9000 \
-v ${LOCALDIR}/sonar/sonarqube_conf:/opt/sonarqube/conf \
-v ${LOCALDIR}/sonar/sonarqube_extensions:/opt/sonarqube/extensions \
-v ${LOCALDIR}/sonar/sonarqube_logs:/opt/sonarqube/logs \
-v ${LOCALDIR}/sonar/sonarqube_data:/opt/sonarqube/data \
sonarqube:7.9.2-community
sonarqube@sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube/extensions/plugins$ ls -l
total 99604
-rw-r--r-- 1 sonarqube sonarqube 224 Feb 25 2020 README.txt
-rw-r--r-- 1 sonarqube sonarqube 5008194 Feb 25 2020 sonar-csharp-plugin-8.4.0.15306.jar
-rw-r--r-- 1 sonarqube sonarqube 8787134 Feb 25 2020 sonar-css-plugin-1.2.0.1325.jar
-rw-r--r-- 1 sonarqube sonarqube 1544789 Feb 25 2020 sonar-flex-plugin-2.5.1.1831.jar
-rw-r--r-- 1 sonarqube sonarqube 6857471 Feb 25 2020 sonar-go-plugin-1.6.0.719.jar
-rw-r--r-- 1 sonarqube sonarqube 807419 Feb 25 2020 sonar-html-plugin-3.2.0.2082.jar
-rw-r--r-- 1 sonarqube sonarqube 15098 Feb 25 2020 sonar-jacoco-plugin-1.0.2.475.jar
-rw-r--r-- 1 sonarqube sonarqube 17038515 Feb 25 2020 sonar-java-plugin-6.1.0.20866.jar
-rw-r--r-- 1 sonarqube sonarqube 10073198 Feb 25 2020 sonar-javascript-plugin-6.2.0.12043.jar
-rw-r--r-- 1 sonarqube sonarqube 7595999 Feb 25 2020 sonar-kotlin-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 5114297 Feb 25 2020 sonar-php-plugin-3.3.0.5166.jar
-rw-r--r-- 1 sonarqube sonarqube 3027270 Feb 25 2020 sonar-python-plugin-2.5.0.5733.jar
-rw-r--r-- 1 sonarqube sonarqube 10036210 Feb 25 2020 sonar-ruby-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 9202024 Feb 25 2020 sonar-scala-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 3625116 Feb 25 2020 sonar-scm-git-plugin-1.9.1.1834.jar
-rw-r--r-- 1 sonarqube sonarqube 7229293 Feb 25 2020 sonar-scm-svn-plugin-1.9.0.1295.jar
-rw-r--r-- 1 sonarqube sonarqube 5746 Feb 25 2020 sonar-typescript-plugin-2.1.0.4359.jar
-rw-r--r-- 1 sonarqube sonarqube 3736364 Feb 25 2020 sonar-vbnet-plugin-8.4.0.15306.jar
-rw-r--r-- 1 sonarqube sonarqube 2242738 Feb 25 2020 sonar-xml-plugin-2.0.1.2020.jar
drwxrwsrwx 2 root sonarqube 6 Jun 27 16:54 tmp
sonarqube@sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube/extensions/plugins$
[root@riyimei ~]# ls -l
total 26528
-rw-------. 1 root root 1492 Jan 11 2020 anaconda-ks.cfg
-rw-r----- 1 root root 572 Jun 25 00:08 busybox.yaml
-rw-r----- 1 root root 479 Jun 24 23:40 calico1-nginx.yaml
drwxr-x--- 4 root root 164 Jun 22 22:54 ingress-nginx
-rw-r--r-- 1 root root 24991 Jun 22 22:49 ingress-nginx-3.34.0.tgz
-rwxr-xr-x 1 rancher 121 13662028 Apr 28 19:39 kk
drwxr-x--- 3 root root 70 Jun 26 09:37 kubekey
-rw-r----- 1 root root 13335652 Jun 20 22:32 kubekey-v1.1.0-linux-amd64.tar.gz
-rw-r----- 1 root root 152 Jun 24 23:33 namespace.yaml
-rw-r----- 1 root root 1152 Jun 22 22:44 ng.yaml
-rw-r--r-- 1 rancher 121 21122 Apr 28 19:36 README.md
-rw-r--r-- 1 rancher 121 21056 Apr 28 19:36 README_zh-CN.md
-rw-r--r-- 1 root root 61903 Jun 28 01:05 sonar-l10n-zh-plugin-8.9.jar
[root@riyimei ~]# kubectl -n kubesphere-devops-system cp sonar-l10n-zh-plugin-8.9.jar sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube/extensions/plugins
[root@riyimei ~]# kubectl -n kubesphere-devops-system exec -it sonarqube-sonarqube-544cd95ccd-8q5bj bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
sonarqube@sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube$ cd /opt/sonarqube/extensions/plugins
sonarqube@sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube/extensions/plugins$ ls -l
total 99668
-rw-r--r-- 1 sonarqube sonarqube 224 Feb 25 2020 README.txt
-rw-r--r-- 1 sonarqube sonarqube 5008194 Feb 25 2020 sonar-csharp-plugin-8.4.0.15306.jar
-rw-r--r-- 1 sonarqube sonarqube 8787134 Feb 25 2020 sonar-css-plugin-1.2.0.1325.jar
-rw-r--r-- 1 sonarqube sonarqube 1544789 Feb 25 2020 sonar-flex-plugin-2.5.1.1831.jar
-rw-r--r-- 1 sonarqube sonarqube 6857471 Feb 25 2020 sonar-go-plugin-1.6.0.719.jar
-rw-r--r-- 1 sonarqube sonarqube 807419 Feb 25 2020 sonar-html-plugin-3.2.0.2082.jar
-rw-r--r-- 1 sonarqube sonarqube 15098 Feb 25 2020 sonar-jacoco-plugin-1.0.2.475.jar
-rw-r--r-- 1 sonarqube sonarqube 17038515 Feb 25 2020 sonar-java-plugin-6.1.0.20866.jar
-rw-r--r-- 1 sonarqube sonarqube 10073198 Feb 25 2020 sonar-javascript-plugin-6.2.0.12043.jar
-rw-r--r-- 1 sonarqube sonarqube 7595999 Feb 25 2020 sonar-kotlin-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 61903 Jun 27 17:07 sonar-l10n-zh-plugin-8.9.jar
-rw-r--r-- 1 sonarqube sonarqube 5114297 Feb 25 2020 sonar-php-plugin-3.3.0.5166.jar
-rw-r--r-- 1 sonarqube sonarqube 3027270 Feb 25 2020 sonar-python-plugin-2.5.0.5733.jar
-rw-r--r-- 1 sonarqube sonarqube 10036210 Feb 25 2020 sonar-ruby-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 9202024 Feb 25 2020 sonar-scala-plugin-1.5.0.315.jar
-rw-r--r-- 1 sonarqube sonarqube 3625116 Feb 25 2020 sonar-scm-git-plugin-1.9.1.1834.jar
-rw-r--r-- 1 sonarqube sonarqube 7229293 Feb 25 2020 sonar-scm-svn-plugin-1.9.0.1295.jar
-rw-r--r-- 1 sonarqube sonarqube 5746 Feb 25 2020 sonar-typescript-plugin-2.1.0.4359.jar
-rw-r--r-- 1 sonarqube sonarqube 3736364 Feb 25 2020 sonar-vbnet-plugin-8.4.0.15306.jar
-rw-r--r-- 1 sonarqube sonarqube 2242738 Feb 25 2020 sonar-xml-plugin-2.0.1.2020.jar
drwxrwsrwx 2 root sonarqube 6 Jun 27 16:54 tmp
sonarqube@sonarqube-sonarqube-544cd95ccd-8q5bj:/opt/sonarqube/extensions/plugins$ command terminated with exit code 137
[root@riyimei ~]#
安装插件
https://github.com/spotbugs/sonar-findbugs