Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active Apr 25, 2020
Embed
What would you like to do?
Sonarqube Docker Compose - Alpine

SonarQube Docker

  • Create a directory for project
  • Copy docker-compose.yml
  • Create /extensions in project directory.
  • Run docker-compose up -d
version: '3.1'
services:
db:
image: postgres:alpine
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
- POSTGRES_DB=sonar
networks:
- sonarnet
volumes:
- postgresql_data:/var/lib/postgresql/data
sonarqube:
image: sonarqube:8.2-community
depends_on:
- db
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
- SONARQUBE_JDBC_URL=jdbc:postgresql://db/sonar
networks:
- sonarnet
ports:
- "9000:9000"
volumes:
- ./extensions:/opt/sonarqube/extensions
networks:
sonarnet:
volumes:
postgresql_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment