
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Maintained by:
https://github.com/SonarSource/docker-sonarqube
Where to get help:
the SonarSource Community forum, the Docker Community Forums, the Docker Community Slack, or Stack Overflow
Dockerfile linkshttps://github.com/SonarSource/docker-sonarqube/blob/824ea0f883def7b7f1b35cfa9b87a6a20f616167/commercial-editions/developer/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/824ea0f883def7b7f1b35cfa9b87a6a20f616167/commercial-editions/enterprise/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/824ea0f883def7b7f1b35cfa9b87a6a20f616167/commercial-editions/datacenter/app/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/824ea0f883def7b7f1b35cfa9b87a6a20f616167/commercial-editions/datacenter/search/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/21dbae3d7df8f96e641955104c459a18ad50c396/commercial-editions/developer/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/21dbae3d7df8f96e641955104c459a18ad50c396/commercial-editions/enterprise/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/21dbae3d7df8f96e641955104c459a18ad50c396/commercial-editions/datacenter/app/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/21dbae3d7df8f96e641955104c459a18ad50c396/commercial-editions/datacenter/search/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/6c3a0d72fca31c9fe49782f75c735e1df17ed637/commercial-editions/developer/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/6c3a0d72fca31c9fe49782f75c735e1df17ed637/commercial-editions/enterprise/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/6c3a0d72fca31c9fe49782f75c735e1df17ed637/commercial-editions/datacenter/app/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/6c3a0d72fca31c9fe49782f75c735e1df17ed637/commercial-editions/datacenter/search/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/24038659701d0a53c0f494d57f09c4da67274020/commercial-editions/developer/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/24038659701d0a53c0f494d57f09c4da67274020/commercial-editions/enterprise/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/24038659701d0a53c0f494d57f09c4da67274020/commercial-editions/datacenter/app/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/24038659701d0a53c0f494d57f09c4da67274020/commercial-editions/datacenter/search/Dockerfile
https://github.com/SonarSource/docker-sonarqube/blob/2820b787cfd098c13fd6505626cf27fce2dc66e8/community-build/Dockerfile
Where to file issues:
https://github.com/SonarSource/docker-sonarqube/issues?q=
Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
https://hub.docker.com/r/amd64/sonarqube/, https://hub.docker.com/r/arm64v8/sonarqube/
Published image artifact details:
https://github.com/docker-library/repo-info/blob/master/repos/sonarqube (https://github.com/docker-library/repo-info/commits/master/repos/sonarqube)
(image metadata, transfer size, etc)
Image updates:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fsonarqube
https://github.com/docker-library/official-images/blob/master/library/sonarqube (https://github.com/docker-library/official-images/commits/master/library/sonarqube)
Source of this description:
https://github.com/docker-library/docs/tree/master/sonarqube (https://github.com/docker-library/docs/commits/master/sonarqube)
sonarqube?sonarqube Docker repository stores the official Sonar images for SonarQube Server and SonarQube Community Build.
SonarQube Server (formerly SonarQube) is an on-premise analysis tool designed to detect quality and security issues in 30+ languages, frameworks, and IaC platforms. The solution also provides fix recommendations leveraging AI with Sonar's AI CodeFix capability. By integrating directly with your CI pipeline or on one of the supported DevOps platforms, your code is checked against an extensive set of rules that cover many attributes of code, such as maintainability, reliability, and security issues on each merge/pull request.
SonarQube Community Build (formerly SonarQube Community) is Sonar's self-managed free offering, released on a monthly schedule. It includes the latest core capabilities available in open source, providing essential features such as bug detection, identification of code smells, and basic security issue analysis across 21 programming languages and frameworks. For advanced security analysis, enterprise-grade integrations, and scalability features, the commercial version, SonarQube Server, is available.
Here, you'll find the Docker images for the SonarQube Server (Developer Edition, Enterprise Edition, and Data Center Edition), as well as for SonarQube Community Build.
Because SonarQube uses an embedded Elasticsearch, make sure that your Docker host configuration complies with the Elasticsearch production mode requirements and File Descriptors configuration.
For example, on Linux, you can set the recommended values for the current session by running the following commands as root on the host:
consolesysctl -w vm.max_map_count=524288 sysctl -w fs.file-max=131072 ulimit -n 131072 ulimit -u 8192
To quickly run a demo instance, see Using Docker on the Try Out SonarQube page. When you are ready to move to a more sustainable setup, take some time to read the Installation and Configuration sections below.
Multi-platform support: Starting from SonarQube
9.9, the docker images support running both onamd64architecture andarm64-based Apple Silicon.
For installation instructions, see Installing the Server from the Docker Image on the Install the Server page.
To run a cluster with the SonarQube Server Data Center Edition, please refer to Installing SonarQube Server from the Docker Image on the Install the Server as a Cluster page.
LTA refers to the version of SonarQube Server that will stay active for a longer period of time. Currently, 2026.1 is the latest LTA version and should be used when LTA version is preferred. To install the latest LTA, you can pull one of the 2026-lta-<edition> tags.
By default, the server running within the container will listen on port 9000. You can expose the container port 9000 to the host port 9000 with the -p 9000:9000 argument to docker run, like the command below:
consoledocker run --name sonarqube-custom -p 9000:9000 sonarqube:community
You can then browse to http://localhost:9000 or http://host-ip:9000 in your web browser to access the web interface.
By default, the image will use an embedded H2 database that is not suited for production.
Warning: Only a single instance of SonarQube Server or SonarQube Community Build can connect to a database schema. If you're using a Docker Swarm or Kubernetes, make sure that multiple instances are never running on the same database schema simultaneously. This will cause the SonarQube to behave unpredictably, and data will be corrupted. There is no safeguard, as described on SONAR-***. The SonarQube Server Data Center Edition has the same limitation in that only one cluster can connect to one database schema at the same time.
Set up a database by following the "Installing the Database" section.
We recommend creating volumes for the following directories:
/opt/sonarqube/data: data files, such as the embedded H2 database and Elasticsearch indexes/opt/sonarqube/logs: contains SonarQube logs about access, web process, CE process, Elasticsearch logs/opt/sonarqube/extensions: for 3rd party pluginsBeginning with SonarQube Server 2026.1, the use of the Java Attach API for ElasticSearch 8.x initialization creates socket files in the hardcoded and unchangeable path /tmp/.java_pid<PID>. It is essential to ensure that SonarQube Server processes have both read and write access to the /tmp/ folder to function correctly.
Warning: You cannot use the same volumes on multiple instances of SonarQube.
For upgrade instructions, see Upgrading from the Docker Image on the Upgrade the Server page.
In some environments, it may make more sense to prepare a custom image containing your configuration. A Dockerfile to achieve this may be as simple as:
dockerfileFROM sonarqube:community COPY sonar-custom-plugin-1.0.jar /opt/sonarqube/extensions/
You could then build and try the image with something like:
console$ docker build --tag=sonarqube-custom . $ docker run -ti sonarqube-custom
The instance will stop gracefully, waiting for any tasks in progress to finish. Waiting for in-progress tasks to finish can take a large amount of time, which the docker does not expect by default when stopping. To avoid having the instance killed by the Docker daemon after 10 seconds, it is best to configure a timeout to stop the container with --stop-timeout. For example:
consoledocker run --stop-timeout 3600 sonarqube
Information about administering your instance of SonarQube Server begins here.
SonarQube Community Build is licensed under GNU Lesser General Public License, Version 3.0. SonarQube Server Developer, Enterprise, and Data Center Editions are licensed under SonarSource Terms and Condition.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in https://github.com/docker-library/repo-info/tree/master/repos/sonarqube.
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
以下是 sonarqube 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务