This is a quick entry to show how to run sonarqube using Podman. Please note that I’m using windows powershell.
First, create the next directory structure and add the following SQL script into sql directory:
\SONARQUBE
\---sql
init-dabase.sql
Script content:
-- Creating db user and database for sonarqube
CREATE USER mysonaruser PASSWORD 'mypassword';
CREATE DATABASE sonarqube OWNER mysonaruser;
Open that directory into the terminal, download the images from docker repository and create the volumes.
# Download images
podman pull postgres:15.4
podman pull sonarqube:9.9.2-community
# Create volumes
podman volume create sonarqube_data
podman volume create sonarqube_logs
podman volume create sonarqube_extensions
podman volume create postgres-data
There are two ways to run the containers, creating a network or run in the same pod, please choose only one of the next.
Seguir leyendo