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

    安装插件
    https://github.com/spotbugs/sonar-findbugs