Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit ff227ed

Browse files
committed
Fix filesystem permissions.
1 parent cef3b00 commit ff227ed

File tree

7 files changed

+53
-16
lines changed

7 files changed

+53
-16
lines changed

3.2.1-full/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SonarQube 7.4 image with bundled sonar-scala 7.2.0 (https://github.com/mwz/sonar-scala).
2+
3+
FROM sonarqube:7.4-community
4+
5+
ENV SONAR_SCALA_VERSION 7.2.0
6+
7+
WORKDIR /opt/sonarqube/extensions/plugins
8+
RUN wget -O "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
9+
"https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar"
10+
11+
WORKDIR $SONARQUBE_HOME
12+
ENTRYPOINT ["./bin/run.sh"]

3.2.1/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Minideb image with bundled sonar-scala 7.2.0 (https://github.com/mwz/sonar-scala),
2+
# which can be mounted as a volume into a SonarQube container.
3+
4+
FROM bitnami/minideb:stretch
5+
RUN install_packages curl ca-certificates
6+
7+
ENV SONAR_SCALA_VERSION 7.2.0
8+
9+
RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
10+
WORKDIR /opt/sonarqube/extensions/plugins
11+
RUN curl -L -o "sonar-scala-plugin-${SONAR_SCALA_VERSION}.jar" \
12+
"https://dl.bintray.com/mwz/maven/com/github/mwz/sonar-scala_2.12/${SONAR_SCALA_VERSION}/sonar-scala_2.12-${SONAR_SCALA_VERSION}-assembly.jar"
13+
RUN chown -R sonarqube:sonarqube /opt/sonarqube

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,38 @@ docker-compose up -d
1414

1515
Once docker pulls all the required images and starts up the containers, the application should become available on [http://localhost](http://localhost). The default SonarQube login details for the Administrator account are `admin:admin`.
1616

17-
You can also use a standalone docker image which contains SonarQube with bundled sonar-scala plugin [`mwizner/sonarqube-scala-plugins:3.2.0-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
17+
You can also use a standalone docker image which contains SonarQube with bundled sonar-scala plugin, [`mwizner/sonarqube-scala-plugins:3.2.1-full`](https://hub.docker.com/r/mwizner/sonarqube-scala-plugins).
1818

1919
To start the container issue the following command:
2020
```bash
21-
docker run -d --name sonarqube-scala-plugins-full \
21+
docker run -d \
22+
--name sonarqube-scala-plugins-full \
2223
-p 80:9000 \
2324
-e SONARQUBE_JDBC_USERNAME=sonar \
2425
-e SONARQUBE_JDBC_PASSWORD=sonar \
2526
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
26-
mwizner/sonarqube-scala-plugins:3.2.0-full
27+
mwizner/sonarqube-scala-plugins:3.2.1-full
28+
```
29+
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production, but if you don't have access to an existing database or you just want to try the image, you can use the following command:
30+
```bash
31+
docker run --rm \
32+
--name sonarqube-scala-plugins-full \
33+
-p 80:9000 \
34+
mwizner/sonarqube-scala-plugins:3.2.1-full
2735
```
28-
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production.
2936

3037

3138
## Dependencies
3239
* [SonarQube 6.7 LTS](https://hub.docker.com/_/sonarqube) / [SonarQube 7.4](https://hub.docker.com/_/sonarqube)
3340
* [PostgreSQL 10](https://hub.docker.com/_/postgres)
34-
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat.
35-
* versions before `2.7.0` used [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) for scapegoat support.
41+
* [mwz/sonar-scala](https://github.com/mwz/sonar-scala) - provides support for scalastyle, scoverage and scapegoat
42+
* versions before `2.7.0` used [arthepsy/sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) for scapegoat support
3643

3744

3845
## Compatibility Matrix
3946
Version | SonarQube | sonar-scala | sonar-scala-extra
4047
--------|-----------|-------------|------------------
48+
[3.2.1](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.2.1) | 7.4 ([documentation](https://docs.sonarqube.org/7.4/)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.2.0](https://github.com/mwz/sonar-scala/releases/tag/v7.2.0) |
4149
[3.2.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.2.0) | 7.4 ([documentation](https://docs.sonarqube.org/7.4/)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.2.0](https://github.com/mwz/sonar-scala/releases/tag/v7.2.0) |
4250
[3.1.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.1.0) | 7.4 ([documentation](https://docs.sonarqube.org/7.4/)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14549)) | [7.1.0](https://github.com/mwz/sonar-scala/releases/tag/v7.1.0) |
4351
[3.0.0](https://github.com/mwz/sonarqube-scala-docker/releases/tag/3.0.0) | 7.3 ([documentation](https://docs.sonarqube.org/display/SONARQUBE73/Documentation)) ([changelog](https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10930&version=14464)) | [7.0.0](https://github.com/mwz/sonar-scala/releases/tag/v7.0.0) |
@@ -60,6 +68,7 @@ Please note, that starting from version `2.7.0`, the images no longer contain th
6068

6169

6270
## Changelog
71+
- **3.2.1** - Fixed file system permissions.
6372
- **3.2.0** - Upgraded sonar-scala to 7.2.0.
6473
- **3.1.0** - Upgraded sonar-scala to 7.1.0 & SonarQube to 7.4.
6574
- **3.0.0** - Upgraded sonar-scala to 7.0.0 & SonarQube to 7.3.

README_DOCKERHUB.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ There are two types of images available: images with [sonar-scala](https://githu
66

77
Starting from version `2.7.0`, the images no longer contain the [sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugin as sonar-scala provides Scapegoat support from version `6.5.0` onwards.
88

9-
- `3.2.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.0/Dockerfile), [(v3.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.0)
9+
- `3.2.1`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.1/Dockerfile), [(v3.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.1)
10+
- `3.2.1-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.1/Dockerfile), [(v3.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.1)
11+
- `3.2.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.0/Dockerfile), [(v3.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.0)
1012
- `3.2.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.2.0-full/Dockerfile), [(v3.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.2.0)
1113
- `3.1.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.1.0/Dockerfile), [(v3.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.1.0)
1214
- `3.1.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/3.1.0-full/Dockerfile), [(v3.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/3.1.0)
@@ -37,6 +39,8 @@ Starting from version `2.7.0`, the images no longer contain the [sonar-scala-ext
3739
## What's included
3840
Version | SonarQube | sonar-scala | sonar-scala-extra
3941
--------|-----------|-------------|------------------
42+
3.2.1 || 7.2.0
43+
3.2.1-full | 7.4 | 7.2.0
4044
3.2.0 || 7.2.0
4145
3.2.0-full | 7.4 | 7.2.0
4246
3.1.0 || 7.1.0
@@ -81,7 +85,7 @@ services:
8185
- plugins
8286
8387
plugins:
84-
image: mwizner/sonarqube-scala-plugins:3.2.0
88+
image: mwizner/sonarqube-scala-plugins:3.2.1
8589
volumes:
8690
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
8791
command: /bin/true
@@ -103,7 +107,7 @@ docker run -d --name sonarqube-scala-plugins-full \
103107
-e SONARQUBE_JDBC_USERNAME=sonar \
104108
-e SONARQUBE_JDBC_PASSWORD=sonar \
105109
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
106-
mwizner/sonarqube-scala-plugins:3.2.0-full
110+
mwizner/sonarqube-scala-plugins:3.2.1-full
107111
```
108112

109113
Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production.

dev/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Alpine image with bundled sonar-scala plugin (https://github.com/mwz/sonar-scala),
1+
# Minideb image with bundled sonar-scala plugin (https://github.com/mwz/sonar-scala),
22
# which can be mounted as a volume into a SonarQube container.
33
# This image is intended to be used for local development purposes.
44

5-
FROM alpine:3.8
5+
FROM bitnami/minideb:stretch
66

77
ARG SONAR_SCALA_VERSION
88

9-
RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/v3.8/community wget ca-certificates
10-
9+
RUN groupadd -r sonarqube && useradd -r -g sonarqube sonarqube
10+
ADD --chown=sonarqube:sonarqube sonar-scala_2.12-assembly.jar /opt/sonarqube/extensions/plugins/sonar-scala_2.12-assembly.jar
1111
WORKDIR /opt/sonarqube/extensions/plugins
12-
ADD sonar-scala_2.12-assembly.jar .

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
- postgresql:/var/lib/postgresql
3232
- postgresql_data:/var/lib/postgresql/data
3333
plugins:
34-
image: mwizner/sonarqube-scala-plugins:3.2.0
34+
image: mwizner/sonarqube-scala-plugins:3.2.1
3535
volumes:
3636
- sonarqube_plugins:/opt/sonarqube/extensions/plugins
3737
command: /bin/true

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
export VERSION=3.2.0
4+
export VERSION=3.2.1
55

66
# Build
77
docker build -t mwizner/sonarqube-scala-plugins:$VERSION -t mwizner/sonarqube-scala-plugins:latest $VERSION

0 commit comments

Comments
 (0)