million12/docker-sonar

Name: docker-sonar

Owner: MILLION12

Description: Sonar in docker (CentOS 7)

Created: 2016-03-09 18:54:10.0

Updated: 2017-06-14 11:17:19.0

Pushed: 2016-03-09 21:48:33.0

Homepage: null

Size: 4

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

docker-sonar

CircleCI Build Status GitHub Open Issues GitHub Stars GitHub Forks
Stars on Docker Hub Pulls on Docker Hub
Docker Layers

Dockr Image with SonarQube build on top of official CentOS-7 image.

Build

Too build just type:

docker build -t million12/sonar .
Run

Sonar needs PostgreSQL database to be able to connect to and creade default database.

PostgreSQL

docker run -d \
  --name sonar-db \
  -e POSTGRES_USER=sonar \
  -e POSTGRES_PASSWORD=sonar \
  postgres  

Sonar

docker run -d \
  --name sonar \
  --link sonar-db:sonar.db \
  -p 9000:9000 \
  -e SONARQUBE_JDBC_URL=jdbc:postgresql://sonar.db:5432/sonar \
  -e SONARQUBE_JDBC_USERNAME=sonar \
  -e SONARQUBE_JDBC_PASSWORD=sonar \
  million12/sonar
Access web-interface

|Tool | Link | Credentials | | ————- | ————- | ————- | | SonarQube | http://docker.ip}:9000 | admin/admin |

Plugins

List of installed plugins:
sonar-java-plugin
sonar-web-plugin
sonar-scm-git-plugin
sonar-github-plugin
Please see Dockerfile for specific plugin version

Docker troubleshooting

Use docker command to see if all required containers are up and running:

$ docker ps -a

Check online logs of sonar container:

$ docker logs sonar

Attach to running sonar container (to detach the tty without exiting the shell, use the escape sequence Ctrl+p + Ctrl+q):

$ docker attach sonar

Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:

docker exec -i -t sonar /bin/bash

History of an image and size of layers:

docker history --no-trunc=true million12/sonar | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'

Author

Author: Przemyslaw Ozgo linux@ozgo.info

Licensed under: The MIT License (MIT)

Sponsored by PrototypeBrewery.io - the new prototyping tool for building fully interactive prototypes of your website or web app. Built on top of Neos CMS and Zurb Foundation framework.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.