USA-based live DevOps, DevSecOps, Cloud Engineering and AI training. Learn AWS, Azure, Jenkins, Docker, Kubernetes and Terraform through hands-on labs, expert mentorship and career coaching by Coach AK.
Install SonarQube using Docker | Install SonarQube using Docker on Ubuntu 18.0.4 | Install SonarQube using Docker-Compose
How to setup Sonarqube using Docker and Docker compose?
SonarQube is static code analyis tool. It can be installed quickly using Docker with less manual steps.
Pre-requisites:
Ubuntu EC2 up and running with at least t2.small
Port 9000 is opened in security firewall rule
Install Docker
sudo apt-get install docker -y
Install Docker-Compose
sudo apt-get install docker-compose -y
What is Docker Compose?
Compose is a tool for defining and running multi-container Docker applications.
With Compose, you use a YAML file to configure your application’s services.
Then, with a single command, you create and start all the services
from your configuration.
The purpose of docker-compose is to function as docker cli but to issue multiple commands much more quickly. To make use of docker-compose, you need to encode the commands you were running before into a docker-compose.yml file
Run docker-compose up and Compose starts and runs your entire app.
Create docker-compose.yml
this yml has all configuration for installing both SonarQube and Postgresql:
sudo vi docker-compose.yml
(Copy the below code high-lighted in yellow color)
Join the Discussion
Have a question about this tutorial or need help with a lab? Share your questions and feedback below.
Post a Comment