Skip to content

Commit 2995134

Browse files
committed
add sonar scanner
1 parent a04bc83 commit 2995134

File tree

5 files changed

+49
-11
lines changed

5 files changed

+49
-11
lines changed

Diff for: README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ A collection of docker-compose files for local development compatible with the W
44

55
## List of Images
66

7-
| Image | Port | Username | Password |
8-
| ----------------- | ----- | -------- | -------- |
9-
| CockpitCMS | 7320 | - | - |
10-
| MariaDB 10.1 | 3306 | devel | devel |
11-
| MariaDB (Latest) | 3306 | devel | devel |
12-
| MongoDB (Latest) | 27017 | root | root |
13-
| MySQL 5.7 | 3306 | devel | devel |
14-
| MySQL (Latest) | 3306 | devel | devel |
15-
| Postgres (Latest) | 5432 | postgres | root |
16-
| RabbitMQ (Latest) | 15672 | devel | devel |
17-
| Traccar 4.10 | 8082 | - | - |
7+
| Image | Port | Username | Password |
8+
| ----------------------- | ----- | -------- | -------- |
9+
| CockpitCMS | 7320 | - | - |
10+
| MariaDB 10.1 | 3306 | devel | devel |
11+
| MariaDB (Latest) | 3306 | devel | devel |
12+
| MongoDB (Latest) | 27017 | root | root |
13+
| MySQL 5.7 | 3306 | devel | devel |
14+
| MySQL (Latest) | 3306 | devel | devel |
15+
| Postgres (Latest) | 5432 | postgres | root |
16+
| RabbitMQ (Latest) | 15672 | devel | devel |
17+
| SonarScanner 4.4.0.2170 | - | - | - |
18+
| Traccar 4.10 | 8082 | - | - |

Diff for: sonar-scanner/4.4.0.2170/.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
COMPOSE_PROJECT_NAME=sonar-scanner
2+
COMPOSE_IGNORE_ORPHANS=true

Diff for: sonar-scanner/4.4.0.2170/Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
FROM alpine:3.12.0
3+
4+
ARG SONAR_SCANNER_CLI_VERSION="4.4.0.2170"
5+
6+
# Prepare workspace
7+
RUN apk add --no-cache curl grep sed unzip bash openjdk8
8+
WORKDIR /src
9+
COPY . .
10+
11+
# Install the sonar scanner cli
12+
# Based off https://github.com/newtmitch/docker-sonar-scanner/blob/master/Dockerfile.sonarscanner-3.2.0-alpine
13+
WORKDIR /tmp
14+
RUN curl --insecure -o ./sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_CLI_VERSION}-linux.zip
15+
RUN unzip ./sonarscanner.zip
16+
RUN rm ./sonarscanner.zip
17+
RUN mv ./sonar-scanner-${SONAR_SCANNER_CLI_VERSION}-linux /usr/lib/sonar-scanner
18+
RUN ln -s /usr/lib/sonar-scanner/bin/sonar-scanner /usr/local/bin/sonar-scanner
19+
ENV SONAR_RUNNER_HOME=/usr/lib/sonar-scanner
20+
RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner
21+
22+
WORKDIR /src
23+
24+
ENTRYPOINT ["sonar-scanner"]

Diff for: sonar-scanner/4.4.0.2170/docker-compose.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SONAR_SCANNER_CLI_VERSION="4.4.0.2170"

Diff for: sonar-scanner/4.4.0.2170/docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "3.7"
2+
3+
services:
4+
sonar-scanner-4.4.0.2170:
5+
container_name: sonar-scanner-4.4.0.2170
6+
build:
7+
context: ./
8+
dockerfile: ./Dockerfile
9+
env_file:
10+
- ./docker-compose.env

0 commit comments

Comments
 (0)