Comments (5)
What I found when I used a MySQL DB was that the database name had to be sonar
, so that might be hardcoded somewhere, I didn't dig into it too far.
For your other error use sh
instead of bash
as Alpine Linux does not include bash
by default:
- docker exec -it sonarqube bash
+ docker exec -it sonarqube sh
from docker-sonarqube.
now I running with raw "docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube" is ok
but when I command "docker exec -it sonarqube bash"
was error "rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"bash\": executable file not found in $PATH""
from docker-sonarqube.
@patrickmslatteryvt First of all thank you for helping here! This is very much appreciated! โค๏ธ
You're right about bash
and Alpine image. ๐
However as shown below, I cannot reproduce any of problems with MySQL that were mentioned here including
when used a MySQL DB was that the database name had to be sonar, so that might be hardcoded somewhere
Maybe this was about default user and password for DB that are both sonar
- see
docker-sonarqube/5.6.6/Dockerfile
Lines 7 to 8 in c6aa0bb
After creation of MySQL with database named sq
:
docker run --rm \
--name db \
-e MYSQL_DATABASE=sq \
-e MYSQL_ROOT_PASSWORD=root-password \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=user-password \
mysql
SonarQube succesfully connects to it:
docker run --rm \
--link db:db \
-e SONARQUBE_JDBC_URL="jdbc:mysql://db/sq?useUnicode=true&characterEncoding=utf8" \
-e SONARQUBE_JDBC_USERNAME=user \
-e SONARQUBE_JDBC_PASSWORD=user-password \
sonarqube
as log shows:
...
2017.08.15 18:29:50 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:mysql://db/sq?useUnicode=true&characterEncoding=utf8
...
2017.08.15 18:29:52 INFO web[][DbMigrations] Executing DB migrations...
2017.08.15 18:29:52 INFO web[][DbMigrations] #1 'Create initial schema'...
2017.08.15 18:29:53 INFO web[][DbMigrations] #1 'Create initial schema': success | time=1698ms
2017.08.15 18:29:53 INFO web[][DbMigrations] #2 'Populate initial schema'...
...
was not work
what was in log?
from docker-sonarqube.
@Godin You are correct, I tried to replicate the issue with my Ansible deployment scripts and was not able to make the Sonarqube install break when I changed the MySQL DB name.
I know I did have issues with this when I wrote the deployment scripts as I put this line in:
mysql_database: sonar # THE DB _MUST_ BE CALLED "sonar"
But it all works now! :-)
A few minor differences I had were that:
- I used networks rather than links (which are deprecated) but that shouldn't break it
- I used the MySQL image from Oracle (mysql/mysql-server)
- I used Sonarqube v6.4 rather than v6.5, I tested with both just now and they both connect to MySQL DBs with names other than
sonar
docker image pull mysql/mysql-server:5.7
docker image pull sonarqube:6.4
docker image pull sonarqube:6.5
docker network create sonarqube
docker run \
-it \
--rm \
--name db \
--env MYSQL_DATABASE=sq \
--env MYSQL_ROOT_PASSWORD=root-password \
--env MYSQL_USER=user \
--env MYSQL_PASSWORD=user-password \
--network=sonarqube \
mysql/mysql-server:5.7
docker run \
-it \
--rm \
--env SONARQUBE_JDBC_URL="jdbc:mysql://db/sq?useUnicode=true&characterEncoding=utf8&useSSL=false" \
--env SONARQUBE_JDBC_USERNAME=user \
--env SONARQUBE_JDBC_PASSWORD=user-password \
--network=sonarqube \
sonarqube:6.4
2017.08.15 20:43:02 INFO web[][o.s.s.p.d.m.AutoDbMigration] Automatically perform DB migration on fresh install
2017.08.15 20:43:02 INFO web[][DbMigrations] Executing DB migrations...
2017.08.15 20:43:02 INFO web[][DbMigrations] #1 'Create initial schema'...
2017.08.15 20:43:03 INFO web[][DbMigrations] #1 'Create initial schema': success | time=712ms
2017.08.15 20:43:03 INFO web[][DbMigrations] #2 'Populate initial schema'...
2017.08.15 20:43:03 INFO web[][DbMigrations] #2 'Populate initial schema': success | time=55ms
<snip>
2017.08.15 20:43:31 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
from docker-sonarqube.
I'm sorry, I didn't know how to check the log before the container started
Now the reason for the problem has been found, because the mysql5.1 version is too low
Thanks @patrickmslatteryvt , @Godin
from docker-sonarqube.
Related Issues (20)
- Add curl to container to allow native Docker healthchecks HOT 2
- docker run -e ็ๅๆฐๆฏๅจๅช้ๅฎไน็๏ผไธบไปไนๆ็ๅฏไปฅๆ็ไธ่ก HOT 5
- sonarqube dashboard show 0% code coverage sometime. HOT 1
- Can't find rule `Promises should not be misused` HOT 3
- sonarqube token dissappears almost immediately on AWS ec2, HOT 3
- SonarQube docker: wrong ownership of mounted volumn HOT 3
- Docker image deploy ulimit and baseos HOT 1
- Trying to upgrade sonar 9.9.0-developer edition to latest (10.1.0-developer), build is successful but not generating the sonar report from azure devops
- SonarQube 10.2 does not start with postgres 15.4 HOT 2
- There is insufficient memory for the Java Runtime Environment to continue. HOT 3
- Missing linux/amd64 for version 10.2.1-xxx HOT 2
- permissions issues with 9.9 HOT 5
- Option to use alpine version again HOT 10
- Security hardening for Sonarqube POD/containers deployed through HELM charts in Azure Kubernetes cluster HOT 1
- Docker image cant run due to java issue HOT 2
- Elasticsearch error HOT 8
- gid=0 will violate future Pod Security Standards Restricted Profile HOT 5
- root Group not compliant with Baseline PodSecurityStandard HOT 1
- Resolve vulnerabilities in docker images HOT 5
- Include necessary port bind on documentation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-sonarqube.