Skip to content

Commit f2cdd56

Browse files
authored
docs: update readme to indicate the port binding (#2486)
1 parent b388767 commit f2cdd56

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sonarqube/content.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ To run a cluster with the Data Center Edition, please refer to Installing SonarQ
3737
3838
## Configuration
3939

40+
### Port binding
41+
42+
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:
43+
44+
```console
45+
docker run --name sonarqube-custom -p 9000:9000 %%IMAGE%%:10.6-community
46+
```
47+
48+
You can then browse to `http://localhost:9000` or `http://host-ip:9000` in your web browser to access the SonarQube web interface.
49+
4050
### Database
4151

4252
By default, the image will use an embedded H2 database that is not suited for production.
@@ -66,7 +76,7 @@ For upgrade instructions, see Upgrading from the Docker Image on the [Upgrade th
6676
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:
6777

6878
```dockerfile
69-
FROM sonarqube:8.9-community
79+
FROM %%IMAGE%%:10.6-community
7080
COPY sonar-custom-plugin-1.0.jar /opt/sonarqube/extensions/
7181
```
7282

0 commit comments

Comments
 (0)